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

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

Issue 2438743003: Implement GENERICBLOCK option. (Closed)
Patch Set: Address comments from engedy@ Created 4 years, 2 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/indexed_ruleset.h
diff --git a/components/subresource_filter/core/common/indexed_ruleset.h b/components/subresource_filter/core/common/indexed_ruleset.h
index debb39405760d02f13ddc5724a737020a2980537..811f9d93aa488a337e410e4f73ab1c98b8d167c6 100644
--- a/components/subresource_filter/core/common/indexed_ruleset.h
+++ b/components/subresource_filter/core/common/indexed_ruleset.h
@@ -123,25 +123,16 @@ class IndexedRulesetMatcher {
const GURL& document_url,
const url::Origin& parent_document_origin,
proto::ActivationType activation_type) const;
- // TODO(pkalinnikov): GetActivationTypesForDocument.
// Returns whether the network request to |url| of |element_type| initiated by
// |document_origin| is not allowed to proceed. Always returns false if the
// |url| is not valid or |element_type| == ELEMENT_TYPE_UNSPECIFIED.
bool ShouldDisallowResourceLoad(const GURL& url,
const FirstPartyOrigin& first_party,
- proto::ElementType element_type) const;
+ proto::ElementType element_type,
+ bool disable_generic_rules) const;
private:
- // Returns whether the network request matches a particular part of the index.
- // |is_third_party| should reflect relation between |url| and |initiator|.
- static bool IsMatch(const flat::UrlPatternIndex* index,
- const GURL& url,
- const url::Origin& initiator,
- proto::ElementType element_type,
- proto::ActivationType activation_type,
- bool is_third_party);
-
const flat::IndexedRuleset* root_;
DISALLOW_COPY_AND_ASSIGN(IndexedRulesetMatcher);

Powered by Google App Engine
This is Rietveld 408576698