summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/api_definitions_natives.cc
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/renderer/api_definitions_natives.cc')
-rw-r--r--extensions/renderer/api_definitions_natives.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/extensions/renderer/api_definitions_natives.cc b/extensions/renderer/api_definitions_natives.cc
index 61ea710..96f1f2c 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(