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

Unified Diff: lib/csp.js

Issue 29705719: Issue 6402 - Split filter hit / request logging out into own API (Closed)
Patch Set: Addressed Manish's feedback Created May 9, 2018, 5:53 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 | « include.preload.js ('k') | lib/cssInjection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/csp.js
diff --git a/lib/csp.js b/lib/csp.js
index 38e6c3d501bbad8d1ce5818c8bc55fddab4c6647..6d6183c87e114b73200d6e130628bbec3ca6178e 100644
--- a/lib/csp.js
+++ b/lib/csp.js
@@ -23,7 +23,7 @@ const {RegExpFilter, WhitelistFilter} =
const {extractHostFromFrame, isThirdParty} = require("./url");
const {checkWhitelisted} = require("./whitelisting");
const {FilterNotifier} = require("filterNotifier");
-const devtools = require("./devtools");
+const {logRequest} = require("./hitLogger");
const {typeMap} = RegExpFilter;
@@ -58,8 +58,10 @@ browser.webRequest.onHeadersReceived.addListener(details =>
return;
}
- devtools.logRequest([details.tabId], details.url, "CSP", hostname,
- thirdParty, null, specificOnly, cspMatch);
+ logRequest([details.tabId], {
+ url: details.url, type: "CSP", docDomain: hostname,
+ thirdParty, specificOnly
+ }, cspMatch);
FilterNotifier.emit("filter.hitCount", cspMatch, 0, 0, [details.tabId]);
if (cspMatch instanceof WhitelistFilter)
« no previous file with comments | « include.preload.js ('k') | lib/cssInjection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld