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

Side by Side Diff: extensions/browser/value_store/test_value_store_factory.h

Issue 1909773002: Convert //extensions/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 EXTENSIONS_BROWSER_VALUE_STORE_TEST_VALUE_STORE_FACTORY_H_ 5 #ifndef EXTENSIONS_BROWSER_VALUE_STORE_TEST_VALUE_STORE_FACTORY_H_
6 #define EXTENSIONS_BROWSER_VALUE_STORE_TEST_VALUE_STORE_FACTORY_H_ 6 #define EXTENSIONS_BROWSER_VALUE_STORE_TEST_VALUE_STORE_FACTORY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <set> 10 #include <set>
10 11
11 #include "base/memory/scoped_ptr.h"
12 #include "extensions/browser/value_store/value_store_factory.h" 12 #include "extensions/browser/value_store/value_store_factory.h"
13 #include "extensions/common/extension.h" 13 #include "extensions/common/extension.h"
14 14
15 class ValueStore; 15 class ValueStore;
16 16
17 namespace extensions { 17 namespace extensions {
18 18
19 // Used for tests when a new test ValueStore is required. Will either open a 19 // Used for tests when a new test ValueStore is required. Will either open a
20 // database on disk (if path provided) returning a |LeveldbValueStore|. 20 // database on disk (if path provided) returning a |LeveldbValueStore|.
21 // Otherwise a new |TestingValueStore| instance will be returned. 21 // Otherwise a new |TestingValueStore| instance will be returned.
22 class TestValueStoreFactory : public ValueStoreFactory { 22 class TestValueStoreFactory : public ValueStoreFactory {
23 public: 23 public:
24 TestValueStoreFactory(); 24 TestValueStoreFactory();
25 explicit TestValueStoreFactory(const base::FilePath& db_path); 25 explicit TestValueStoreFactory(const base::FilePath& db_path);
26 26
27 // ValueStoreFactory 27 // ValueStoreFactory
28 scoped_ptr<ValueStore> CreateRulesStore() override; 28 std::unique_ptr<ValueStore> CreateRulesStore() override;
29 scoped_ptr<ValueStore> CreateStateStore() override; 29 std::unique_ptr<ValueStore> CreateStateStore() override;
30 scoped_ptr<ValueStore> CreateSettingsStore( 30 std::unique_ptr<ValueStore> CreateSettingsStore(
31 settings_namespace::Namespace settings_namespace, 31 settings_namespace::Namespace settings_namespace,
32 ModelType model_type, 32 ModelType model_type,
33 const ExtensionId& extension_id) override; 33 const ExtensionId& extension_id) override;
34 void DeleteSettings(settings_namespace::Namespace settings_namespace, 34 void DeleteSettings(settings_namespace::Namespace settings_namespace,
35 ModelType model_type, 35 ModelType model_type,
36 const ExtensionId& extension_id) override; 36 const ExtensionId& extension_id) override;
37 bool HasSettings(settings_namespace::Namespace settings_namespace, 37 bool HasSettings(settings_namespace::Namespace settings_namespace,
38 ModelType model_type, 38 ModelType model_type,
39 const ExtensionId& extension_id) override; 39 const ExtensionId& extension_id) override;
40 std::set<ExtensionId> GetKnownExtensionIDs( 40 std::set<ExtensionId> GetKnownExtensionIDs(
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 StorageHelper local_helper_; 86 StorageHelper local_helper_;
87 StorageHelper sync_helper_; 87 StorageHelper sync_helper_;
88 StorageHelper managed_helper_; 88 StorageHelper managed_helper_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(TestValueStoreFactory); 90 DISALLOW_COPY_AND_ASSIGN(TestValueStoreFactory);
91 }; 91 };
92 92
93 } // namespace extensions 93 } // namespace extensions
94 94
95 #endif // EXTENSIONS_BROWSER_VALUE_STORE_TEST_VALUE_STORE_FACTORY_H_ 95 #endif // EXTENSIONS_BROWSER_VALUE_STORE_TEST_VALUE_STORE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698