Chromium Code Reviews| Index: chrome/common/extensions/api/extension_api.cc |
| diff --git a/chrome/common/extensions/api/extension_api.cc b/chrome/common/extensions/api/extension_api.cc |
| index eaf64a65baf5d5c00f76dc32b07bba3f18cff9d9..a3c7b8c5100ffa2401734717eef77823102705bd 100644 |
| --- a/chrome/common/extensions/api/extension_api.cc |
| +++ b/chrome/common/extensions/api/extension_api.cc |
| @@ -286,7 +286,7 @@ void ExtensionAPI::LoadSchema(const std::string& name, |
| if (!uses_feature_system) |
| continue; |
| - Feature* feature = new Feature(); |
| + SimpleFeature* feature = new SimpleFeature(); |
|
not at google - send to devlin
2012/12/12 17:42:41
s/SimpleFeature/Feature/ in the LHS of expressions
justinlin
2012/12/14 12:26:26
Done, except for this instance in the file. In thi
|
| feature->set_name(schema_namespace); |
| feature->Parse(schema); |
| @@ -307,7 +307,7 @@ void ExtensionAPI::LoadSchema(const std::string& name, |
| DictionaryValue* child = NULL; |
| CHECK(child_list->GetDictionary(j, &child)); |
| - scoped_ptr<Feature> child_feature(new Feature(*feature)); |
| + scoped_ptr<SimpleFeature> child_feature(new SimpleFeature(*feature)); |
| child_feature->Parse(child); |
| if (child_feature->Equals(*feature)) |
| continue; // no need to store no-op features |
| @@ -525,7 +525,8 @@ bool ExtensionAPI::IsPrivileged(const std::string& full_name) { |
| ResolveDependencies(&resolved_dependencies); |
| for (std::set<std::string>::iterator iter = resolved_dependencies.begin(); |
| iter != resolved_dependencies.end(); ++iter) { |
| - Feature* dependency = GetFeatureDependency(*iter); |
| + SimpleFeature* dependency = |
| + static_cast<SimpleFeature*>(GetFeatureDependency(*iter)); |
| for (std::set<Feature::Context>::iterator context = |
| dependency->contexts()->begin(); |
| context != dependency->contexts()->end(); ++context) { |
| @@ -695,7 +696,7 @@ scoped_ptr<std::set<std::string> > ExtensionAPI::GetAPIsForContext( |
| return result.Pass(); |
| } |
| -Feature* ExtensionAPI::GetFeature(const std::string& full_name) { |
| +SimpleFeature* ExtensionAPI::GetFeature(const std::string& full_name) { |
| // Ensure it's loaded. |
| GetSchema(full_name); |
| @@ -706,7 +707,7 @@ Feature* ExtensionAPI::GetFeature(const std::string& full_name) { |
| if (feature_map == features_.end()) |
| return NULL; |
| - Feature* result = NULL; |
| + SimpleFeature* result = NULL; |
| FeatureMap::iterator child_feature = feature_map->second->find(child_name); |
| if (child_feature != feature_map->second->end()) { |
| result = child_feature->second.get(); |
| @@ -725,7 +726,8 @@ Feature* ExtensionAPI::GetFeature(const std::string& full_name) { |
| return result; |
| } |
| -Feature* ExtensionAPI::GetFeatureDependency(const std::string& full_name) { |
| +Feature* ExtensionAPI::GetFeatureDependency( |
| + const std::string& full_name) { |
| std::string feature_type; |
| std::string feature_name; |
| SplitDependencyName(full_name, &feature_type, &feature_name); |