OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_TEST_RULESET_UTILS_H_ | 5 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_TEST_RULESET_UTILS_H_ |
6 #define COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_TEST_RULESET_UTILS_H_ | 6 #define COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_TEST_RULESET_UTILS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/strings/string_piece.h" | 12 #include "base/strings/string_piece.h" |
13 #include "components/subresource_filter/core/common/proto/rules.pb.h" | 13 #include "components/subresource_filter/core/common/proto/rules.pb.h" |
14 | 14 |
15 namespace subresource_filter { | 15 namespace subresource_filter { |
16 namespace testing { | 16 namespace testing { |
17 | 17 |
18 proto::UrlRule CreateUrlRule(base::StringPiece pattern, | |
Charlie Harrison
2017/04/04 13:58:26
This might need some documentation that it doesn't
pkalinnikov
2017/04/04 16:42:59
Done.
| |
19 proto::UrlPatternType pattern_type); | |
20 | |
18 proto::UrlRule CreateSuffixRule(base::StringPiece suffix); | 21 proto::UrlRule CreateSuffixRule(base::StringPiece suffix); |
19 | 22 |
20 proto::UrlRule CreateWhitelistRuleForDocument( | 23 proto::UrlRule CreateWhitelistRuleForDocument( |
21 base::StringPiece pattern, | 24 base::StringPiece pattern, |
22 int32_t activation_types = proto::ACTIVATION_TYPE_DOCUMENT, | 25 int32_t activation_types = proto::ACTIVATION_TYPE_DOCUMENT, |
23 std::vector<std::string> domains = std::vector<std::string>()); | 26 std::vector<std::string> domains = std::vector<std::string>()); |
24 | 27 |
25 } // namespace testing | 28 } // namespace testing |
26 } // namespace subresource_filter | 29 } // namespace subresource_filter |
27 | 30 |
28 #endif // COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_TEST_RULESET_UTILS_H_ | 31 #endif // COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_TEST_RULESET_UTILS_H_ |
OLD | NEW |