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

Side by Side Diff: extensions/common/features/feature_provider.h

Issue 1908953003: Convert //extensions/{common,shell} from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_COMMON_FEATURES_FEATURE_PROVIDER_H_ 5 #ifndef EXTENSIONS_COMMON_FEATURES_FEATURE_PROVIDER_H_
6 #define EXTENSIONS_COMMON_FEATURES_FEATURE_PROVIDER_H_ 6 #define EXTENSIONS_COMMON_FEATURES_FEATURE_PROVIDER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/memory/scoped_ptr.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 class Feature; 16 class Feature;
17 17
18 using FeatureMap = std::map<std::string, scoped_ptr<Feature>>; 18 using FeatureMap = std::map<std::string, std::unique_ptr<Feature>>;
19 19
20 // Implemented by classes that can vend features. 20 // Implemented by classes that can vend features.
21 class FeatureProvider { 21 class FeatureProvider {
22 public: 22 public:
23 FeatureProvider() {} 23 FeatureProvider() {}
24 virtual ~FeatureProvider() {} 24 virtual ~FeatureProvider() {}
25 25
26 // 26 //
27 // Static helpers. 27 // Static helpers.
28 // 28 //
(...skipping 30 matching lines...) Expand all
59 // Returns the features inside the |parent| namespace, recursively. 59 // Returns the features inside the |parent| namespace, recursively.
60 virtual std::vector<Feature*> GetChildren(const Feature& parent) const = 0; 60 virtual std::vector<Feature*> GetChildren(const Feature& parent) const = 0;
61 61
62 // Returns a map containing all features described by this instance. 62 // Returns a map containing all features described by this instance.
63 virtual const FeatureMap& GetAllFeatures() const = 0; 63 virtual const FeatureMap& GetAllFeatures() const = 0;
64 }; 64 };
65 65
66 } // namespace extensions 66 } // namespace extensions
67 67
68 #endif // EXTENSIONS_COMMON_FEATURES_FEATURE_PROVIDER_H_ 68 #endif // EXTENSIONS_COMMON_FEATURES_FEATURE_PROVIDER_H_
OLDNEW
« no previous file with comments | « extensions/common/features/complex_feature_unittest.cc ('k') | extensions/common/features/feature_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698