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

Side by Side Diff: chrome/ext/background.js

Issue 29394585: Issue 5027 - Use updated webRequest API for WebSocket blocking (Closed)
Patch Set: change comment grammer, fix line wrapping Created March 28, 2017, 8:07 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
« no previous file with comments | « no previous file | lib/csp.js » ('j') | lib/csp.js » ('J')
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-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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 let results = ext.webRequest.onBeforeRequest._dispatch( 533 let results = ext.webRequest.onBeforeRequest._dispatch(
534 new URL(details.url), 534 new URL(details.url),
535 requestType, 535 requestType,
536 new Page({id: details.tabId}), 536 new Page({id: details.tabId}),
537 frame 537 frame
538 ); 538 );
539 539
540 if (results.indexOf(false) != -1) 540 if (results.indexOf(false) != -1)
541 return {cancel: true}; 541 return {cancel: true};
542 } 542 }
543 }, {urls: ["http://*/*", "https://*/*"]}, ["blocking"]); 543 }, {urls: ["<all_urls>"]}, ["blocking"]);
544 544
545 545
546 /* Message passing */ 546 /* Message passing */
547 547
548 chrome.runtime.onMessage.addListener((message, rawSender, sendResponse) => 548 chrome.runtime.onMessage.addListener((message, rawSender, sendResponse) =>
549 { 549 {
550 let sender = {}; 550 let sender = {};
551 551
552 // Add "page" and "frame" if the message was sent by a content script. 552 // Add "page" and "frame" if the message was sent by a content script.
553 // If sent by popup or the background page itself, there is no "tab". 553 // If sent by popup or the background page itself, there is no "tab".
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 ext.windows = { 669 ext.windows = {
670 create(createData, callback) 670 create(createData, callback)
671 { 671 {
672 chrome.windows.create(createData, createdWindow => 672 chrome.windows.create(createData, createdWindow =>
673 { 673 {
674 afterTabLoaded(callback)(createdWindow.tabs[0]); 674 afterTabLoaded(callback)(createdWindow.tabs[0]);
675 }); 675 });
676 } 676 }
677 }; 677 };
678 } 678 }
OLDNEW
« no previous file with comments | « no previous file | lib/csp.js » ('j') | lib/csp.js » ('J')

Powered by Google App Engine
This is Rietveld