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

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

Issue 2793993002: [subresource_filter] Replace KMP by std::search. (Closed)
Patch Set: Fix DCHECK. Created 3 years, 8 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/test_ruleset_utils.h
diff --git a/components/subresource_filter/core/common/test_ruleset_utils.h b/components/subresource_filter/core/common/test_ruleset_utils.h
index ef7086502eafe1405b44af188eaf147ea0f3fcae..d7023f86b056d16108508f917ff0444f4205004b 100644
--- a/components/subresource_filter/core/common/test_ruleset_utils.h
+++ b/components/subresource_filter/core/common/test_ruleset_utils.h
@@ -15,8 +15,13 @@
namespace subresource_filter {
namespace testing {
+// Creates a blacklist URL rule which targets subresources of any type such that
+// the resource URL ends with |suffix|.
proto::UrlRule CreateSuffixRule(base::StringPiece suffix);
+// Same as CreateUrlRule(pattern, proto::URL_PATTERN_TYPE_WILDCARDED), but the
+// rule applies to the specified |activation_types|, and to no element types.
+// Additionally, it is restricted to a set of |domains| (if provided).
proto::UrlRule CreateWhitelistRuleForDocument(
base::StringPiece pattern,
int32_t activation_types = proto::ACTIVATION_TYPE_DOCUMENT,

Powered by Google App Engine
This is Rietveld 408576698