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

Unified Diff: chrome/common/extensions/features/base_feature_provider.h

Issue 109683007: Pass a Feature* to IsAnyFeatureAvailableToContext instead of a string name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update extension_api_stub.cc Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/features/base_feature_provider.h
diff --git a/chrome/common/extensions/features/base_feature_provider.h b/chrome/common/extensions/features/base_feature_provider.h
index 8f7d32509d4f7afbad0695b0f12430551f11f937..6b9c46c1b707ada94069a44baf09b4c6e751ed9d 100644
--- a/chrome/common/extensions/features/base_feature_provider.h
+++ b/chrome/common/extensions/features/base_feature_provider.h
@@ -31,16 +31,17 @@ class BaseFeatureProvider : public FeatureProvider {
static FeatureProvider* GetByName(const std::string& name);
// Gets the feature |feature_name|, if it exists.
- virtual Feature* GetFeature(const std::string& feature_name) OVERRIDE;
- virtual Feature* GetParent(Feature* feature) OVERRIDE;
+ virtual Feature* GetFeature(const std::string& feature_name) const OVERRIDE;
+ virtual Feature* GetParent(Feature* feature) const OVERRIDE;
- virtual const std::vector<std::string>& GetAllFeatureNames() OVERRIDE;
+ virtual const std::vector<std::string>& GetAllFeatureNames() const OVERRIDE;
private:
typedef std::map<std::string, linked_ptr<Feature> > FeatureMap;
FeatureMap features_;
- std::vector<std::string> feature_names_;
+ // Populated on first use.
+ mutable std::vector<std::string> feature_names_;
FeatureFactory factory_;
};
« no previous file with comments | « chrome/common/extensions/api/extension_api_unittest.cc ('k') | chrome/common/extensions/features/base_feature_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698