Chromium Code Reviews| Index: components/subresource_filter/core/common/test_ruleset_creator.h |
| diff --git a/components/subresource_filter/core/common/test_ruleset_creator.h b/components/subresource_filter/core/common/test_ruleset_creator.h |
| index 3601b98163d0f31c207921370fb3483558c52d67..e4185e2a5d80ab1aa1935c9c8bedcf1ab36862ba 100644 |
| --- a/components/subresource_filter/core/common/test_ruleset_creator.h |
| +++ b/components/subresource_filter/core/common/test_ruleset_creator.h |
| @@ -5,6 +5,10 @@ |
| #ifndef COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_TEST_RULESET_CREATOR_H_ |
| #define COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_TEST_RULESET_CREATOR_H_ |
| +#include <stdint.h> |
| + |
| +#include <vector> |
| + |
| #include "base/files/file.h" |
| #include "base/files/scoped_temp_dir.h" |
| #include "base/macros.h" |
| @@ -20,8 +24,13 @@ class TestRulesetCreator { |
| ~TestRulesetCreator(); |
| // Creates a testing ruleset to disallow subresource loads from URL paths |
| - // having the given |suffix|, and returns a read-only file handle to it in |
| - // |ruleset_file|. |
| + // having the given |suffix|, and appends the ruleset data to the |buffer|. |
|
engedy
2016/07/22 14:19:58
nit: Don't forget to update this.
pkalinnikov
2016/07/25 11:41:12
Done.
|
| + static void CreateRulesetToDisallowURLsWithPathSuffix( |
| + base::StringPiece suffix, |
| + std::vector<uint8_t>* buffer); |
| + |
| + // Same as above, but puts the ruleset into a file and returns its read-only |
| + // file handle in |ruleset_file|. |
| // |
| // The underlying temporary file will be deleted when the TestRulesetCreator |
| // instance goes out of scope, but the |ruleset_file| handle may outlive and |