Index: extensions/renderer/api_definitions_natives.cc |
diff --git a/extensions/renderer/api_definitions_natives.cc b/extensions/renderer/api_definitions_natives.cc |
index 61ea7109fc282b169c8b29a2b0099afcc23c0ad7..96f1f2c6eb80b21f690ec6bb26f6a80dc69ac12a 100644 |
--- a/extensions/renderer/api_definitions_natives.cc |
+++ b/extensions/renderer/api_definitions_natives.cc |
@@ -24,14 +24,10 @@ void ApiDefinitionsNatives::GetExtensionAPIDefinitionsForTest( |
const v8::FunctionCallbackInfo<v8::Value>& args) { |
std::vector<std::string> apis; |
const FeatureProvider* feature_provider = FeatureProvider::GetAPIFeatures(); |
- const std::vector<std::string>& feature_names = |
- feature_provider->GetAllFeatureNames(); |
- for (std::vector<std::string>::const_iterator i = feature_names.begin(); |
- i != feature_names.end(); |
- ++i) { |
- if (!feature_provider->GetParent(feature_provider->GetFeature(*i)) && |
- context()->GetAvailability(*i).is_available()) { |
- apis.push_back(*i); |
+ for (const auto& map_entry : feature_provider->GetAllFeatures()) { |
+ if (!feature_provider->GetParent(map_entry.second.get()) && |
+ context()->GetAvailability(map_entry.first).is_available()) { |
+ apis.push_back(map_entry.first); |
} |
} |
args.GetReturnValue().Set( |