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

Unified Diff: webrequest.js

Issue 29330321: Issue 3334 - Fix warnings spotted during testing before release (Closed)
Patch Set: Created Nov. 17, 2015, 4:44 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« lib/whitelisting.js ('K') | « metadata.common ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrequest.js
diff --git a/webrequest.js b/webrequest.js
index bb409c600b09415c69b04b6bfd6d60d11f95ceff..213da10ac422f10b90f190ec120c1afe09aa23f9 100644
--- a/webrequest.js
+++ b/webrequest.js
@@ -18,6 +18,12 @@
var FilterNotifier = require("filterNotifier").FilterNotifier;
var RegExpFilter = require("filterClasses").RegExpFilter;
var platform = require("info").platform;
+var whitelisting = require("whitelisting");
+var defaultMatcher = require("matcher").defaultMatcher;
+var url = require("url");
+var stringifyURL = url.stringifyURL;
+var isThirdParty = url.isThirdParty;
+var extractHostFromFrame = url.extractHostFromFrame;
Wladimir Palant 2015/11/17 18:58:42 I don't think that changes to this file are a good
kzar 2015/11/17 19:06:26 Done.
ext.webRequest.indistinguishableTypes.forEach(function(types)
{
@@ -54,13 +60,14 @@ function onBeforeRequestAsync(url, type, page, filter)
function onBeforeRequest(url, type, page, frame)
{
- if (isFrameWhitelisted(page, frame))
+ if (whitelisting.isFrameWhitelisted(page, frame))
return true;
var docDomain = extractHostFromFrame(frame);
- var key = getKey(page, frame);
- var specificOnly = isFrameWhitelisted(page, frame,
- RegExpFilter.typeMap.GENERICBLOCK);
+ var key = whitelisting.getKey(page, frame);
+ var specificOnly = whitelisting.isFrameWhitelisted(
+ page, frame, RegExpFilter.typeMap.GENERICBLOCK
+ );
var filter = defaultMatcher.matchesAny(
stringifyURL(url),
RegExpFilter.typeMap[type], docDomain,
« lib/whitelisting.js ('K') | « metadata.common ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld