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

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

Issue 2175763002: Integrate IndexedRuleset into DocumentSubresourceFilter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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_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

Powered by Google App Engine
This is Rietveld 408576698