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..1b612f8dc4c8e8d6043f2d29ec0be844d426ddcd 100644 |
--- a/components/subresource_filter/core/common/test_ruleset_utils.h |
+++ b/components/subresource_filter/core/common/test_ruleset_utils.h |
@@ -15,8 +15,19 @@ |
namespace subresource_filter { |
namespace testing { |
+// Creates a simple blacklist URL rule from a |pattern| of a certain |type|. The |
engedy
2017/04/05 10:55:11
This is used only by a single call site to create
pkalinnikov
2017/04/05 13:29:21
SGTM. However, such a rule would be considered uns
engedy
2017/04/05 13:41:33
Sounds good.
|
+// anchors of the rule's pattern are set to ANCHOR_TYPE_NONE, and the rule |
+// targets all element types. |
+proto::UrlRule CreateUrlRule(base::StringPiece pattern, |
+ proto::UrlPatternType pattern_type); |
+ |
+// Creates a blacklist URL rule which targets subresources of any type such that |
engedy
2017/04/05 10:55:10
nit: ... such that the resource URL ends with |suf
pkalinnikov
2017/04/05 13:29:21
Done.
|
+// their URLs end 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, |