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

Side by Side Diff: extensions/common/features/complex_feature.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_COMPLEX_FEATURE_H_ 5 #ifndef EXTENSIONS_COMMON_FEATURES_COMPLEX_FEATURE_H_
6 #define EXTENSIONS_COMMON_FEATURES_COMPLEX_FEATURE_H_ 6 #define EXTENSIONS_COMMON_FEATURES_COMPLEX_FEATURE_H_
7 7
8 #include <memory>
8 #include <set> 9 #include <set>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "extensions/common/extension.h" 14 #include "extensions/common/extension.h"
15 #include "extensions/common/features/feature.h" 15 #include "extensions/common/features/feature.h"
16 #include "extensions/common/manifest.h" 16 #include "extensions/common/manifest.h"
17 17
18 namespace extensions { 18 namespace extensions {
19 19
20 // A ComplexFeature is composed of one or many Features. A ComplexFeature 20 // A ComplexFeature is composed of one or many Features. A ComplexFeature
21 // is available if any Feature (i.e. permission rule) that composes it is 21 // is available if any Feature (i.e. permission rule) that composes it is
22 // available, but not if only some combination of Features is available. 22 // available, but not if only some combination of Features is available.
23 class ComplexFeature : public Feature { 23 class ComplexFeature : public Feature {
24 public: 24 public:
25 using FeatureList = std::vector<scoped_ptr<Feature>>; 25 using FeatureList = std::vector<std::unique_ptr<Feature>>;
26 26
27 explicit ComplexFeature(scoped_ptr<FeatureList> features); 27 explicit ComplexFeature(std::unique_ptr<FeatureList> features);
28 ~ComplexFeature() override; 28 ~ComplexFeature() override;
29 29
30 // extensions::Feature: 30 // extensions::Feature:
31 Availability IsAvailableToManifest(const std::string& extension_id, 31 Availability IsAvailableToManifest(const std::string& extension_id,
32 Manifest::Type type, 32 Manifest::Type type,
33 Manifest::Location location, 33 Manifest::Location location,
34 int manifest_version, 34 int manifest_version,
35 Platform platform) const override; 35 Platform platform) const override;
36 36
37 Availability IsAvailableToContext(const Extension* extension, 37 Availability IsAvailableToContext(const Extension* extension,
(...skipping 15 matching lines...) Expand all
53 53
54 private: 54 private:
55 FeatureList features_; 55 FeatureList features_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(ComplexFeature); 57 DISALLOW_COPY_AND_ASSIGN(ComplexFeature);
58 }; 58 };
59 59
60 } // namespace extensions 60 } // namespace extensions
61 61
62 #endif // EXTENSIONS_COMMON_FEATURES_COMPLEX_FEATURE_H_ 62 #endif // EXTENSIONS_COMMON_FEATURES_COMPLEX_FEATURE_H_
OLDNEW
« no previous file with comments | « extensions/common/features/base_feature_provider.cc ('k') | extensions/common/features/complex_feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698