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: Avoid breaking jsdoc Created Nov. 17, 2015, 7 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
« no previous file with comments | « 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;
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,
« no previous file with comments | « metadata.common ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld