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

Side by Side Diff: lib/contentPolicy.js

Issue 6337686776315904: Issue 394 - hit statistics tool data collection (Closed)
Patch Set: Rebase to changeset: 4056 Created Nov. 24, 2015, 6:44 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « defaults/prefs.json ('k') | lib/filterHits.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 let index = url.indexOf("#"); 137 let index = url.indexOf("#");
138 if (index >= 0) 138 if (index >= 0)
139 url = url.substring(0, index); 139 url = url.substring(0, index);
140 140
141 return url; 141 return url;
142 } 142 }
143 143
144 function addHit(match) 144 function addHit(match)
145 { 145 {
146 if (!PrivateBrowsingUtils.isContentWindowPrivate(wnd)) 146 if (!PrivateBrowsingUtils.isContentWindowPrivate(wnd))
147 FilterStorage.increaseHitCount(match); 147 FilterStorage.increaseHitCount(match, wnd);
148 } 148 }
149 149
150 if (!match && Prefs.enabled) 150 if (!match && Prefs.enabled)
151 { 151 {
152 let testWnd = wnd; 152 let testWnd = wnd;
153 let testSitekey = sitekey; 153 let testSitekey = sitekey;
154 let testSitekeyWnd = sitekeyWnd; 154 let testSitekeyWnd = sitekeyWnd;
155 let parentWndLocation = cleanWindowLocation(testWnd); 155 let parentWndLocation = cleanWindowLocation(testWnd);
156 while (true) 156 while (true)
157 { 157 {
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 if (!wnd || wnd.closed) 686 if (!wnd || wnd.closed)
687 return; 687 return;
688 688
689 if (entry.type == "OBJECT") 689 if (entry.type == "OBJECT")
690 { 690 {
691 node.removeEventListener("mouseover", objectMouseEventHander, true); 691 node.removeEventListener("mouseover", objectMouseEventHander, true);
692 node.removeEventListener("mouseout", objectMouseEventHander, true); 692 node.removeEventListener("mouseout", objectMouseEventHander, true);
693 } 693 }
694 Policy.processNode(wnd, node, entry.type, entry.location, true); 694 Policy.processNode(wnd, node, entry.type, entry.location, true);
695 } 695 }
OLDNEW
« no previous file with comments | « defaults/prefs.json ('k') | lib/filterHits.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld