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

Unified Diff: webrequest.js

Issue 6393086494113792: Issue 154 - Added devtools panel showing blocked and blockable items (Closed)
Patch Set: Rebased Created Feb. 13, 2015, 4:16 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 | « popupBlocker.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrequest.js
===================================================================
--- a/webrequest.js
+++ b/webrequest.js
@@ -17,6 +17,7 @@
var FilterNotifier = require("filterNotifier").FilterNotifier;
var platform = require("info").platform;
+var logRequest = require("devtools").logRequest;
var onFilterChangeTimeout = null;
function onFilterChange()
@@ -52,11 +53,12 @@
if (isFrameWhitelisted(page, frame))
return true;
+ var reqType = type == "sub_frame" ? "SUBDOCUMENT" : type.toUpperCase();
var docDomain = extractHostFromFrame(frame);
var key = getKey(page, frame);
var filter = defaultMatcher.matchesAny(
stringifyURL(url),
- type == "sub_frame" ? "SUBDOCUMENT" : type.toUpperCase(),
+ reqType,
docDomain,
isThirdParty(url, docDomain),
key
@@ -71,7 +73,9 @@
showNotification(notificationToShow);
}
+ logRequest(page, url, reqType, docDomain, key, filter);
FilterNotifier.triggerListeners("filter.hitCount", filter, 0, 0, page);
+
return !(filter instanceof BlockingFilter);
}
« no previous file with comments | « popupBlocker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld