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

Delta Between Two Patch Sets: lib/devtools.js

Issue 29417555: Issue 5130 - Changes url protocol permissions to all urls (Closed)
Left Patch Set: change to explicit urls at handler registration Created April 19, 2017, 12:04 p.m.
Right Patch Set: fix redundancies introduced in last patch Created April 19, 2017, 12:21 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 | « ext/background.js ('k') | lib/popupBlocker.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-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 let match = newPort.name.match(/^devtools-(\d+)$/); 339 let match = newPort.name.match(/^devtools-(\d+)$/);
340 if (!match) 340 if (!match)
341 return; 341 return;
342 342
343 let inspectedTabId = parseInt(match[1], 10); 343 let inspectedTabId = parseInt(match[1], 10);
344 let localOnBeforeRequest = onBeforeRequest.bind(); 344 let localOnBeforeRequest = onBeforeRequest.bind();
345 345
346 chrome.webRequest.onBeforeRequest.addListener( 346 chrome.webRequest.onBeforeRequest.addListener(
347 localOnBeforeRequest, 347 localOnBeforeRequest,
348 { 348 {
349 urls: ["http://*/*", "https://*/*", "ws://*/*", "wss://*/*"], 349 urls: ["http://*/*", "https://*/*"],
Sebastian Noack 2017/04/19 12:10:11 ws[s]:// is redundant here since this code is only
Jon Sonesen 2017/04/19 12:22:27 Done.
350 types: ["main_frame"], 350 types: ["main_frame"],
351 tabId: inspectedTabId 351 tabId: inspectedTabId
352 } 352 }
353 ); 353 );
354 354
355 if (!hasPanels()) 355 if (!hasPanels())
356 { 356 {
357 ext.pages.onLoading.addListener(onLoading); 357 ext.pages.onLoading.addListener(onLoading);
358 FilterNotifier.on("filter.added", onFilterAdded); 358 FilterNotifier.on("filter.added", onFilterAdded);
359 FilterNotifier.on("filter.removed", onFilterRemoved); 359 FilterNotifier.on("filter.removed", onFilterRemoved);
(...skipping 17 matching lines...) Expand all
377 panels[inspectedTabId] = {port: newPort, records: []}; 377 panels[inspectedTabId] = {port: newPort, records: []};
378 }); 378 });
379 379
380 port.on("devtools.traceElemHide", (message, sender) => 380 port.on("devtools.traceElemHide", (message, sender) =>
381 { 381 {
382 logHiddenElements( 382 logHiddenElements(
383 sender.page, message.selectors, message.filters, 383 sender.page, message.selectors, message.filters,
384 extractHostFromFrame(sender.frame) 384 extractHostFromFrame(sender.frame)
385 ); 385 );
386 }); 386 });
LEFTRIGHT

Powered by Google App Engine
This is Rietveld