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

Side by Side Diff: components/subresource_filter/core/common/test_ruleset_creator.h

Issue 2835233002: Fix integration tests in src/chrome and src/extensions so that we can turn on IO thread checks wi... (Closed)
Patch Set: ready for review Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CREATOR_H_ 5 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_TEST_RULESET_CREATOR_H_
6 #define COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_TEST_RULESET_CREATOR_H_ 6 #define COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_TEST_RULESET_CREATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Returns a unique |path| that is valid for the lifetime of this instance. 91 // Returns a unique |path| that is valid for the lifetime of this instance.
92 // No file at |path| will be automatically created. 92 // No file at |path| will be automatically created.
93 void GetUniqueTemporaryPath(base::FilePath* path); 93 void GetUniqueTemporaryPath(base::FilePath* path);
94 94
95 private: 95 private:
96 // Writes the |ruleset_contents| to a temporary file, and initializes 96 // Writes the |ruleset_contents| to a temporary file, and initializes
97 // |ruleset| to have the same |contents|, and the |path| to this file. 97 // |ruleset| to have the same |contents|, and the |path| to this file.
98 void CreateTestRulesetFromContents(std::vector<uint8_t> ruleset_contents, 98 void CreateTestRulesetFromContents(std::vector<uint8_t> ruleset_contents,
99 TestRuleset* ruleset); 99 TestRuleset* ruleset);
100 100
101 base::ScopedTempDir scoped_temp_dir_; 101 std::unique_ptr<base::ScopedTempDir> scoped_temp_dir_;
102 int next_unique_file_suffix = 1; 102 int next_unique_file_suffix = 1;
103 103
104 DISALLOW_COPY_AND_ASSIGN(TestRulesetCreator); 104 DISALLOW_COPY_AND_ASSIGN(TestRulesetCreator);
105 }; 105 };
106 106
107 } // namespace testing 107 } // namespace testing
108 } // namespace subresource_filter 108 } // namespace subresource_filter
109 109
110 #endif // COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_TEST_RULESET_CREATOR_H_ 110 #endif // COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_TEST_RULESET_CREATOR_H_
OLDNEW
« no previous file with comments | « components/drive/service/fake_drive_service.cc ('k') | components/subresource_filter/core/common/test_ruleset_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698