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

Unified Diff: components/subresource_filter/core/common/document_subresource_filter.h

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
Index: components/subresource_filter/core/common/document_subresource_filter.h
diff --git a/components/subresource_filter/core/common/document_subresource_filter.h b/components/subresource_filter/core/common/document_subresource_filter.h
index 611707d9c3d3fb48b11d3f9691dfdecbe9ccf50d..4440973d3a65e5814e7607d1dc7b4d6a040977d0 100644
--- a/components/subresource_filter/core/common/document_subresource_filter.h
+++ b/components/subresource_filter/core/common/document_subresource_filter.h
@@ -57,6 +57,16 @@ class DocumentSubresourceFilter {
ActivationState activation_state,
scoped_refptr<const MemoryMappedRuleset> ruleset);
+ // Constructs a new filter that will:
+ // -- Operate in a manner prescribed in |activation_state|.
+ // -- Filter subresource loads in the scope of a document loaded from
+ // |document_origin|.
+ // -- Hold a reference to and use |ruleset| for its entire lifetime.
+ DocumentSubresourceFilter(url::Origin document_origin,
+ ActivationState activation_state,
+ scoped_refptr<const MemoryMappedRuleset> ruleset,
+ std::unique_ptr<RuleRecorder> recorder);
+
~DocumentSubresourceFilter();
ActivationState activation_state() const { return activation_state_; }

Powered by Google App Engine
This is Rietveld 408576698