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

Unified Diff: lib/whitelisting.js

Issue 29705719: Issue 6402 - Split filter hit / request logging out into own API (Closed)
Patch Set: Addressed Sebastian's feedback Created March 21, 2018, 3:14 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/whitelisting.js
diff --git a/lib/whitelisting.js b/lib/whitelisting.js
index 4307511d17eb796d451f9ac4d1a7cccb3fce286e..528bcaccd5b32f9059eddf575d3f900625e62c79 100644
--- a/lib/whitelisting.js
+++ b/lib/whitelisting.js
@@ -26,7 +26,7 @@ const {FilterStorage} = require("filterStorage");
const {stringifyURL, getDecodedHostname,
extractHostFromFrame, isThirdParty} = require("url");
const {port} = require("messaging");
-const devtools = require("devtools");
+const {logWhitelistedDocument} = require("hitLogger");
const {verifySignature} = require("rsa");
let sitekeys = new ext.PageMap();
@@ -43,13 +43,11 @@ function match(page, url, typeMask, docDomain, sitekey)
urlString, typeMask, docDomain, thirdParty, sitekey
);
- if (filter && devtools)
+ if (filter)
{
- devtools.logWhitelistedDocument(
- page, urlString, typeMask, docDomain, filter
- );
+ logWhitelistedDocument(page ? page.id : -1, urlString, typeMask, docDomain,
+ filter);
}
-
return filter;
}
« lib/hitLogger.js ('K') | « lib/requestBlocker.js ('k') | metadata.chrome » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld