Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: lib/contentPolicy.js

Issue 29329527: Issue 3208 - Consider private browsing in contentPolicy module rather than filterStorage (Closed)
Left Patch Set: Created Oct. 29, 2015, 8:32 p.m.
Right Patch Set: Fixed PrivateBrowsingUtils call Created Nov. 2, 2015, 6:48 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | lib/filterStorage.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 let url = getWindowLocation(wnd); 138 let url = getWindowLocation(wnd);
139 let index = url.indexOf("#"); 139 let index = url.indexOf("#");
140 if (index >= 0) 140 if (index >= 0)
141 url = url.substring(0, index); 141 url = url.substring(0, index);
142 142
143 return url; 143 return url;
144 } 144 }
145 145
146 function addHit(match) 146 function addHit(match)
147 { 147 {
148 if (!PrivateBrowsingUtils.isWindowPrivate(wnd)) 148 if (!PrivateBrowsingUtils.isContentWindowPrivate(wnd))
Thomas Greiner 2015/11/02 17:29:23 I'm wondering whether `wnd` here could potentially
Wladimir Palant 2015/11/02 18:49:22 Ouch, I overlooked the "Chrome" part, and document
149 FilterStorage.increaseHitCount(match); 149 FilterStorage.increaseHitCount(match);
150 } 150 }
151 151
152 if (!match && Prefs.enabled) 152 if (!match && Prefs.enabled)
153 { 153 {
154 let testWnd = wnd; 154 let testWnd = wnd;
155 let testSitekey = sitekey; 155 let testSitekey = sitekey;
156 let testSitekeyWnd = sitekeyWnd; 156 let testSitekeyWnd = sitekeyWnd;
157 let parentWndLocation = cleanWindowLocation(testWnd); 157 let parentWndLocation = cleanWindowLocation(testWnd);
158 while (true) 158 while (true)
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 if (!wnd || wnd.closed) 678 if (!wnd || wnd.closed)
679 return; 679 return;
680 680
681 if (entry.type == "OBJECT") 681 if (entry.type == "OBJECT")
682 { 682 {
683 node.removeEventListener("mouseover", objectMouseEventHander, true); 683 node.removeEventListener("mouseover", objectMouseEventHander, true);
684 node.removeEventListener("mouseout", objectMouseEventHander, true); 684 node.removeEventListener("mouseout", objectMouseEventHander, true);
685 } 685 }
686 Policy.processNode(wnd, node, entry.type, entry.location, true); 686 Policy.processNode(wnd, node, entry.type, entry.location, true);
687 } 687 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld