Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: components/subresource_filter/content/renderer/subresource_filter_agent.cc

Issue 2894523006: Add instrumentation hooks to mesaure which subresource filter rules are used.
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/subresource_filter/content/renderer/web_document_subresource_filter_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/subresource_filter/content/renderer/subresource_filter_agent.cc
diff --git a/components/subresource_filter/content/renderer/subresource_filter_agent.cc b/components/subresource_filter/content/renderer/subresource_filter_agent.cc
index c9b47d511775592418c01a6abfaaae09d69e9a07..b1abe7f9b50332551789cdc76eb2c34ed10c2156 100644
--- a/components/subresource_filter/content/renderer/subresource_filter_agent.cc
+++ b/components/subresource_filter/content/renderer/subresource_filter_agent.cc
@@ -61,6 +61,7 @@ void SubresourceFilterAgent::SendDocumentLoadStatistics(
void SubresourceFilterAgent::OnActivateForNextCommittedLoad(
ActivationState activation_state) {
+ LOG(ERROR) << "OnActivateForNextCommittedLoad";
activation_state_for_next_commit_ = activation_state;
}
@@ -142,8 +143,13 @@ void SubresourceFilterAgent::DidCommitProvisionalLoad(
// TODO(csharrison): Use WebURL and WebSecurityOrigin for efficiency here,
// which require changes to the unit tests.
const GURL& url = GetDocumentURL();
+
if (url.SchemeIsHTTPOrHTTPS() || url.SchemeIsFile()) {
RecordHistogramsOnLoadCommitted();
+ LOG(ERROR) << "Commiting "
+ << activation_state_for_next_commit_.activation_level << " "
+ << url;
+
if (activation_state_for_next_commit_.activation_level !=
ActivationLevel::DISABLED &&
ruleset_dealer_->IsRulesetFileAvailable()) {
« no previous file with comments | « no previous file | components/subresource_filter/content/renderer/web_document_subresource_filter_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698