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

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

Issue 29367316: Issue 4722 - Drop support for Chrome 41 - 48 (Closed)
Left Patch Set: Brought back http CSP comment + indistinguishableTypes Created Dec. 13, 2016, 3:04 p.m.
Right Patch Set: Addressed nit Created Dec. 16, 2016, 10:26 a.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 | include.preload.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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 onBeforeRequest: new ext._EventTarget(), 404 onBeforeRequest: new ext._EventTarget(),
405 handlerBehaviorChanged: function() 405 handlerBehaviorChanged: function()
406 { 406 {
407 // Defer handlerBehaviorChanged() until navigation occurs. 407 // Defer handlerBehaviorChanged() until navigation occurs.
408 // There wouldn't be any visible effect when calling it earlier, 408 // There wouldn't be any visible effect when calling it earlier,
409 // but it's an expensive operation and that way we avoid to call 409 // but it's an expensive operation and that way we avoid to call
410 // it multiple times, if multiple filters are added/removed. 410 // it multiple times, if multiple filters are added/removed.
411 var onBeforeNavigate = chrome.webNavigation.onBeforeNavigate; 411 var onBeforeNavigate = chrome.webNavigation.onBeforeNavigate;
412 if (!onBeforeNavigate.hasListener(propagateHandlerBehaviorChange)) 412 if (!onBeforeNavigate.hasListener(propagateHandlerBehaviorChange))
413 onBeforeNavigate.addListener(propagateHandlerBehaviorChange); 413 onBeforeNavigate.addListener(propagateHandlerBehaviorChange);
414 },
415 getIndistinguishableTypes: function()
416 {
417 return [["OBJECT", "OBJECT_SUBREQUEST"]];
418 } 414 }
419 }; 415 };
420 416
421 chrome.tabs.query({}, function(tabs) 417 chrome.tabs.query({}, function(tabs)
422 { 418 {
423 tabs.forEach(function(tab) 419 tabs.forEach(function(tab)
424 { 420 {
425 chrome.webNavigation.getAllFrames({tabId: tab.id}, function(details) 421 chrome.webNavigation.getAllFrames({tabId: tab.id}, function(details)
426 { 422 {
427 if (details && details.length > 0) 423 if (details && details.length > 0)
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 ext.windows = { 581 ext.windows = {
586 create: function(createData, callback) 582 create: function(createData, callback)
587 { 583 {
588 chrome.windows.create(createData, function(createdWindow) 584 chrome.windows.create(createData, function(createdWindow)
589 { 585 {
590 afterTabLoaded(callback)(createdWindow.tabs[0]); 586 afterTabLoaded(callback)(createdWindow.tabs[0]);
591 }); 587 });
592 } 588 }
593 }; 589 };
594 })(); 590 })();
LEFTRIGHT
« no previous file | include.preload.js » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld