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

Unified Diff: lib/requestBlocker.js

Issue 29705719: Issue 6402 - Split filter hit / request logging out into own API (Closed)
Patch Set: Ensure devtools module is included in the bundle Created Feb. 22, 2018, 4:30 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
Index: lib/requestBlocker.js
diff --git a/lib/requestBlocker.js b/lib/requestBlocker.js
index 56f6313cea25fe63ebfef2c5b0498a70f989117b..de31f6959e5b5a7016c7431f095e061a70c9af2e 100644
--- a/lib/requestBlocker.js
+++ b/lib/requestBlocker.js
@@ -27,7 +27,7 @@ const {Prefs} = require("prefs");
const {checkWhitelisted, getKey} = require("whitelisting");
const {stringifyURL, extractHostFromFrame, isThirdParty} = require("url");
const {port} = require("messaging");
-const devtools = require("devtools");
+const {logRequest} = require("devLogger");
// Chrome can't distinguish between OBJECT_SUBREQUEST and OBJECT requests.
if (!browser.webRequest.ResourceType ||
@@ -81,14 +81,11 @@ function onBeforeRequestAsync(page, url, type, docDomain,
if (filter)
FilterNotifier.emit("filter.hitCount", filter, 0, 0, page);
- if (devtools)
- {
- devtools.logRequest(
- page, url, type, docDomain,
- thirdParty, sitekey,
- specificOnly, filter
- );
- }
+ logRequest(
+ page, url, type, docDomain,
+ thirdParty, sitekey,
+ specificOnly, filter
+ );
}
ext.webRequest.onBeforeRequest.addListener((url, type, page, frame) =>
« lib/devLogger.js ('K') | « lib/popupBlocker.js ('k') | lib/whitelisting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld