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

Delta Between Two Patch Sets: chrome/ext/background.js

Issue 5728050318671872: Issue 926 - Filters should not be applied on local pages (Closed)
Left Patch Set: Created July 15, 2014, 12:04 p.m.
Right Patch Set: Created July 16, 2014, 8:56 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | webrequest.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
(no file at all)
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-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 if (isMainFrame || details.type == "sub_frame") 322 if (isMainFrame || details.type == "sub_frame")
323 frames[details.frameId] = {url: details.url, parent: frame}; 323 frames[details.frameId] = {url: details.url, parent: frame};
324 } 324 }
325 catch (e) 325 catch (e)
326 { 326 {
327 // recent versions of Chrome cancel the request when an error occurs in 327 // recent versions of Chrome cancel the request when an error occurs in
328 // the onBeforeRequest listener. However in our case it is preferred, to 328 // the onBeforeRequest listener. However in our case it is preferred, to
329 // let potentially some ads through, rather than blocking legit requests. 329 // let potentially some ads through, rather than blocking legit requests.
330 console.error(e); 330 console.error(e);
331 } 331 }
332 }, {urls: ["<all_urls>"]}, ["blocking"]); 332 }, {urls: ["http://*/*", "https://*/*"]}, ["blocking"]);
333 333
334 334
335 /* Message passing */ 335 /* Message passing */
336 336
337 chrome.runtime.onMessage.addListener(function(message, rawSender, sendResponse ) 337 chrome.runtime.onMessage.addListener(function(message, rawSender, sendResponse )
338 { 338 {
339 var sender = { 339 var sender = {
340 page: new Page(rawSender.tab), 340 page: new Page(rawSender.tab),
341 frame: { 341 frame: {
342 url: rawSender.url, 342 url: rawSender.url,
(...skipping 16 matching lines...) Expand all
359 }; 359 };
360 360
361 return ext.onMessage._dispatch(message, sender, sendResponse); 361 return ext.onMessage._dispatch(message, sender, sendResponse);
362 }); 362 });
363 363
364 364
365 /* Storage */ 365 /* Storage */
366 366
367 ext.storage = localStorage; 367 ext.storage = localStorage;
368 })(); 368 })();
LEFTRIGHT
« no previous file | webrequest.js » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld