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

Side by Side Diff: extensions/browser/value_store/value_store_factory_impl.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_VALUE_STORE_FACTORY_IMPL_H_ 5 #ifndef EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_FACTORY_IMPL_H_
6 #define EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_FACTORY_IMPL_H_ 6 #define EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_FACTORY_IMPL_H_
7 7
8 #include <memory>
8 #include <set> 9 #include <set>
9 #include <string> 10 #include <string>
10 11
11 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "extensions/browser/value_store/value_store.h" 14 #include "extensions/browser/value_store/value_store.h"
15 #include "extensions/browser/value_store/value_store_factory.h" 15 #include "extensions/browser/value_store/value_store_factory.h"
16 #include "extensions/common/extension.h" 16 #include "extensions/common/extension.h"
17 17
18 namespace extensions { 18 namespace extensions {
19 19
20 class LegacyValueStoreFactory; 20 class LegacyValueStoreFactory;
21 21
22 // Mint new |ValueStore| instances for use by the extensions system. These are 22 // Mint new |ValueStore| instances for use by the extensions system. These are
23 // used for extension rules, state, and settings. 23 // used for extension rules, state, and settings.
24 class ValueStoreFactoryImpl : public ValueStoreFactory { 24 class ValueStoreFactoryImpl : public ValueStoreFactory {
25 public: 25 public:
26 explicit ValueStoreFactoryImpl(const base::FilePath& profile_path); 26 explicit ValueStoreFactoryImpl(const base::FilePath& profile_path);
27 27
28 // ValueStoreFactory 28 // ValueStoreFactory
29 scoped_ptr<ValueStore> CreateRulesStore() override; 29 std::unique_ptr<ValueStore> CreateRulesStore() override;
30 scoped_ptr<ValueStore> CreateStateStore() override; 30 std::unique_ptr<ValueStore> CreateStateStore() override;
31 scoped_ptr<ValueStore> CreateSettingsStore( 31 std::unique_ptr<ValueStore> CreateSettingsStore(
32 settings_namespace::Namespace settings_namespace, 32 settings_namespace::Namespace settings_namespace,
33 ModelType model_type, 33 ModelType model_type,
34 const ExtensionId& extension_id) override; 34 const ExtensionId& extension_id) override;
35 void DeleteSettings(settings_namespace::Namespace settings_namespace, 35 void DeleteSettings(settings_namespace::Namespace settings_namespace,
36 ModelType model_type, 36 ModelType model_type,
37 const ExtensionId& extension_id) override; 37 const ExtensionId& extension_id) override;
38 bool HasSettings(settings_namespace::Namespace settings_namespace, 38 bool HasSettings(settings_namespace::Namespace settings_namespace,
39 ModelType model_type, 39 ModelType model_type,
40 const ExtensionId& extension_id) override; 40 const ExtensionId& extension_id) override;
41 std::set<ExtensionId> GetKnownExtensionIDs( 41 std::set<ExtensionId> GetKnownExtensionIDs(
42 settings_namespace::Namespace settings_namespace, 42 settings_namespace::Namespace settings_namespace,
43 ModelType model_type) const override; 43 ModelType model_type) const override;
44 44
45 private: 45 private:
46 // ValueStoreFactory is refcounted. 46 // ValueStoreFactory is refcounted.
47 ~ValueStoreFactoryImpl() override; 47 ~ValueStoreFactoryImpl() override;
48 48
49 scoped_refptr<LegacyValueStoreFactory> legacy_factory_; 49 scoped_refptr<LegacyValueStoreFactory> legacy_factory_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(ValueStoreFactoryImpl); 51 DISALLOW_COPY_AND_ASSIGN(ValueStoreFactoryImpl);
52 }; 52 };
53 53
54 } // namespace extensions 54 } // namespace extensions
55 55
56 #endif // EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_FACTORY_IMPL_H_ 56 #endif // EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « extensions/browser/value_store/value_store_factory.h ('k') | extensions/browser/value_store/value_store_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698