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

Delta Between Two Patch Sets: webrequest.js

Issue 11627039: Added ad counting functionality (Closed)
Left Patch Set: Created Sept. 18, 2013, 10:07 a.m.
Right Patch Set: Created Sept. 20, 2013, 3 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
« stats.js ('K') | « stats.js ('k') | no next file » | 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 <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return {}; 65 return {};
66 66
67 // Type names match Mozilla's with main_frame and sub_frame being the only exc eptions. 67 // Type names match Mozilla's with main_frame and sub_frame being the only exc eptions.
68 if (type == "sub_frame") 68 if (type == "sub_frame")
69 type = "SUBDOCUMENT"; 69 type = "SUBDOCUMENT";
70 else 70 else
71 type = type.toUpperCase(); 71 type = type.toUpperCase();
72 72
73 var frame = (type != "SUBDOCUMENT" ? details.frameId : details.parentFrameId); 73 var frame = (type != "SUBDOCUMENT" ? details.frameId : details.parentFrameId);
74 var filter = checkRequest(type, details.tabId, details.url, frame); 74 var filter = checkRequest(type, details.tabId, details.url, frame);
75 FilterNotifier.triggerListeners("document.stats", filter, details.tabId); 75 FilterNotifier.triggerListeners("filter.hitCount", filter, 0, 0, details.tabId );
76 if (filter instanceof BlockingFilter) 76 if (filter instanceof BlockingFilter)
77 return {cancel: true}; 77 return {cancel: true};
78 else 78 else
79 return {}; 79 return {};
80 } 80 }
81 81
82 function onHeadersReceived(details) 82 function onHeadersReceived(details)
83 { 83 {
84 if (details.tabId == -1) 84 if (details.tabId == -1)
85 return; 85 return;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 parent = frameData.parent; 193 parent = frameData.parent;
194 parentData = getFrameData(tabId, parent); 194 parentData = getFrameData(tabId, parent);
195 195
196 var frameUrl = frameData.url; 196 var frameUrl = frameData.url;
197 var parentUrl = (parentData ? parentData.url : frameUrl); 197 var parentUrl = (parentData ? parentData.url : frameUrl);
198 if ("keyException" in frameData || isWhitelisted(frameUrl, parentUrl, type)) 198 if ("keyException" in frameData || isWhitelisted(frameUrl, parentUrl, type))
199 return true; 199 return true;
200 } 200 }
201 return false; 201 return false;
202 } 202 }
LEFTRIGHT
« stats.js ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld