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

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

Issue 6228201961422848: Issue 2064 - Configure indistinguishable request types in the abstraction layer (Closed)
Left Patch Set: Created Feb. 28, 2015, 9:56 a.m.
Right Patch Set: Ignore MEDIA and FONT filters on Chrome Created March 2, 2015, 7:22 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 | « background.js ('k') | safari/ext/background.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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 onBeforeRequest: new ext._EventTarget(), 330 onBeforeRequest: new ext._EventTarget(),
331 handlerBehaviorChanged: chrome.webRequest.handlerBehaviorChanged 331 handlerBehaviorChanged: chrome.webRequest.handlerBehaviorChanged
332 }; 332 };
333 333
334 // Since Chrome 38 requests of type 'object' (e.g. requests 334 // Since Chrome 38 requests of type 'object' (e.g. requests
335 // initiated by Flash) are mistakenly reported with the type 'other'. 335 // initiated by Flash) are mistakenly reported with the type 'other'.
336 // https://code.google.com/p/chromium/issues/detail?id=410382 336 // https://code.google.com/p/chromium/issues/detail?id=410382
337 if (parseInt(navigator.userAgent.match(/\bChrome\/(\d+)/)[1], 10) >= 38) 337 if (parseInt(navigator.userAgent.match(/\bChrome\/(\d+)/)[1], 10) >= 38)
338 { 338 {
339 ext.webRequest.indistinguishableTypes = [ 339 ext.webRequest.indistinguishableTypes = [
340 ["OTHER", "OBJECT", "OBJECT_SUBREQUEST", "MEDIA", "FONT"] 340 ["OTHER", "OBJECT", "OBJECT_SUBREQUEST"]
Wladimir Palant 2015/03/02 19:12:18 This will overshoot. With the previous approach, a
Sebastian Noack 2015/03/02 19:23:11 I felt that it's more correct this way. But fair e
341 ]; 341 ];
342 } 342 }
343 else 343 else
344 { 344 {
345 ext.webRequest.indistinguishableTypes = [ 345 ext.webRequest.indistinguishableTypes = [
346 ["OBJECT", "OBJECT_SUBREQUEST"], 346 ["OBJECT", "OBJECT_SUBREQUEST"],
347 ["OTHER", "MEDIA", "FONT"] 347 ["OTHER", "MEDIA", "FONT"]
348 ]; 348 ];
349 } 349 }
350 350
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 callback(new Page(tab)); 531 callback(new Page(tab));
532 } 532 }
533 else 533 else
534 { 534 {
535 ext.pages.open(optionsUrl, callback); 535 ext.pages.open(optionsUrl, callback);
536 } 536 }
537 }); 537 });
538 }); 538 });
539 }; 539 };
540 })(); 540 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld