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

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

Issue 664933004: Standardize usage of virtual/override/final in extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/scoped_vector.h" 11 #include "base/memory/scoped_vector.h"
12 #include "extensions/common/extension.h" 12 #include "extensions/common/extension.h"
13 #include "extensions/common/features/feature.h" 13 #include "extensions/common/features/feature.h"
14 #include "extensions/common/manifest.h" 14 #include "extensions/common/manifest.h"
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 // A ComplexFeature is composed of one or many Features. A ComplexFeature 18 // A ComplexFeature is composed of one or many Features. A ComplexFeature
19 // is available if any Feature (i.e. permission rule) that composes it is 19 // is available if any Feature (i.e. permission rule) that composes it is
20 // available, but not if only some combination of Features is available. 20 // available, but not if only some combination of Features is available.
21 class ComplexFeature : public Feature { 21 class ComplexFeature : public Feature {
22 public: 22 public:
23 typedef ScopedVector<Feature> FeatureList; 23 typedef ScopedVector<Feature> FeatureList;
24 24
25 explicit ComplexFeature(scoped_ptr<FeatureList> features); 25 explicit ComplexFeature(scoped_ptr<FeatureList> features);
26 virtual ~ComplexFeature(); 26 ~ComplexFeature() override;
27 27
28 // extensions::Feature: 28 // extensions::Feature:
29 virtual Availability IsAvailableToManifest(const std::string& extension_id, 29 Availability IsAvailableToManifest(const std::string& extension_id,
30 Manifest::Type type, 30 Manifest::Type type,
31 Manifest::Location location, 31 Manifest::Location location,
32 int manifest_version, 32 int manifest_version,
33 Platform platform) const override; 33 Platform platform) const override;
34 34
35 virtual Availability IsAvailableToContext(const Extension* extension, 35 Availability IsAvailableToContext(const Extension* extension,
36 Context context, 36 Context context,
37 const GURL& url, 37 const GURL& url,
38 Platform platform) const override; 38 Platform platform) const override;
39 39
40 virtual bool IsIdInBlacklist(const std::string& extension_id) const override; 40 bool IsIdInBlacklist(const std::string& extension_id) const override;
41 virtual bool IsIdInWhitelist(const std::string& extension_id) const override; 41 bool IsIdInWhitelist(const std::string& extension_id) const override;
42 42
43 protected: 43 protected:
44 // extensions::Feature: 44 // extensions::Feature:
45 virtual std::string GetAvailabilityMessage( 45 std::string GetAvailabilityMessage(AvailabilityResult result,
46 AvailabilityResult result, 46 Manifest::Type type,
47 Manifest::Type type, 47 const GURL& url,
48 const GURL& url, 48 Context context) const override;
49 Context context) const override;
50 49
51 virtual bool IsInternal() const override; 50 bool IsInternal() const override;
52 51
53 private: 52 private:
54 FeatureList features_; 53 FeatureList features_;
55 54
56 DISALLOW_COPY_AND_ASSIGN(ComplexFeature); 55 DISALLOW_COPY_AND_ASSIGN(ComplexFeature);
57 }; 56 };
58 57
59 } // namespace extensions 58 } // namespace extensions
60 59
61 #endif // EXTENSIONS_COMMON_FEATURES_COMPLEX_FEATURE_H_ 60 #endif // EXTENSIONS_COMMON_FEATURES_COMPLEX_FEATURE_H_
OLDNEW
« no previous file with comments | « extensions/common/features/base_feature_provider.h ('k') | extensions/common/features/manifest_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698