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

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

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.cc
diff --git a/chrome/common/extensions/features/base_feature_provider.cc b/chrome/common/extensions/features/base_feature_provider.cc
index a74cd9c80ab0efa34d4b2c3c847a9b4f6eadea09..524771fe9ae7ccd5cef0fd4c00a8918300fdb9ff 100644
--- a/chrome/common/extensions/features/base_feature_provider.cc
+++ b/chrome/common/extensions/features/base_feature_provider.cc
@@ -188,7 +188,8 @@ FeatureProvider* BaseFeatureProvider::GetByName(
return g_static.Get().GetFeatures(name);
}
-const std::vector<std::string>& BaseFeatureProvider::GetAllFeatureNames() {
+const std::vector<std::string>& BaseFeatureProvider::GetAllFeatureNames()
+ const {
if (feature_names_.empty()) {
for (FeatureMap::const_iterator iter = features_.begin();
iter != features_.end(); ++iter) {
@@ -198,15 +199,15 @@ const std::vector<std::string>& BaseFeatureProvider::GetAllFeatureNames() {
return feature_names_;
}
-Feature* BaseFeatureProvider::GetFeature(const std::string& name) {
- FeatureMap::iterator iter = features_.find(name);
+Feature* BaseFeatureProvider::GetFeature(const std::string& name) const {
+ FeatureMap::const_iterator iter = features_.find(name);
if (iter != features_.end())
return iter->second.get();
else
return NULL;
}
-Feature* BaseFeatureProvider::GetParent(Feature* feature) {
+Feature* BaseFeatureProvider::GetParent(Feature* feature) const {
CHECK(feature);
if (feature->no_parent())
return NULL;
« no previous file with comments | « chrome/common/extensions/features/base_feature_provider.h ('k') | chrome/renderer/extensions/chrome_v8_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698