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

Side by Side Diff: webrequest.js

Issue 29333035: Issue 3453 - Adapt indistinguishable request types for changes in Chrome 49 (Closed)
Patch Set: Created Dec. 23, 2015, 12:10 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
« chrome/ext/background.js ('K') | « safari/ext/background.js ('k') | no next file » | 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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 var FilterNotifier = require("filterNotifier").FilterNotifier; 18 var FilterNotifier = require("filterNotifier").FilterNotifier;
19 var RegExpFilter = require("filterClasses").RegExpFilter; 19 var RegExpFilter = require("filterClasses").RegExpFilter;
20 var platform = require("info").platform; 20 var platform = require("info").platform;
21 21
22 ext.webRequest.indistinguishableTypes.forEach(function(types) 22 ext.webRequest.getIndistinguishableTypes().forEach(function(types)
23 { 23 {
24 for (var i = 1; i < types.length; i++) 24 for (var i = 1; i < types.length; i++)
25 RegExpFilter.typeMap[types[i]] = RegExpFilter.typeMap[types[0]]; 25 RegExpFilter.typeMap[types[i]] = RegExpFilter.typeMap[types[0]];
26 }); 26 });
27 27
28 FilterNotifier.addListener(function(action, arg) 28 FilterNotifier.addListener(function(action, arg)
29 { 29 {
30 switch (action) 30 switch (action)
31 { 31 {
32 case "filter.added": 32 case "filter.added":
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 chrome.webRequest.onHeadersReceived.addListener( 97 chrome.webRequest.onHeadersReceived.addListener(
98 onHeadersReceived, 98 onHeadersReceived,
99 { 99 {
100 urls: ["http://*/*", "https://*/*"], 100 urls: ["http://*/*", "https://*/*"],
101 types: ["main_frame", "sub_frame"] 101 types: ["main_frame", "sub_frame"]
102 }, 102 },
103 ["responseHeaders"] 103 ["responseHeaders"]
104 ); 104 );
105 } 105 }
OLDNEW
« chrome/ext/background.js ('K') | « safari/ext/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld