Index: chrome/browser/extensions/api/content_settings/content_settings_store.cc |
diff --git a/chrome/browser/extensions/api/content_settings/content_settings_store.cc b/chrome/browser/extensions/api/content_settings/content_settings_store.cc |
index 765636dbf9ec3793ae39732d508de8bc37c38e5a..8f9b1c6c00cc6a87eddc4e3da5417044a7a9efc5 100644 |
--- a/chrome/browser/extensions/api/content_settings/content_settings_store.cc |
+++ b/chrome/browser/extensions/api/content_settings/content_settings_store.cc |
@@ -288,13 +288,12 @@ void ContentSettingsStore::SetExtensionContentSettingFromList( |
const std::string& extension_id, |
const base::ListValue* list, |
ExtensionPrefsScope scope) { |
- for (base::ListValue::const_iterator it = list->begin(); |
- it != list->end(); ++it) { |
- if ((*it)->GetType() != base::Value::TYPE_DICTIONARY) { |
+ for (const auto& value : *list) { |
+ base::DictionaryValue* dict; |
+ if (!value->GetAsDictionary(&dict)) { |
NOTREACHED(); |
continue; |
} |
- base::DictionaryValue* dict = static_cast<base::DictionaryValue*>(*it); |
std::string primary_pattern_str; |
dict->GetString(keys::kPrimaryPatternKey, &primary_pattern_str); |
ContentSettingsPattern primary_pattern = |