Index: chrome/browser/plugins/plugin_prefs.cc |
diff --git a/chrome/browser/plugins/plugin_prefs.cc b/chrome/browser/plugins/plugin_prefs.cc |
index 8d45ae4bc09d7f20f8c4f798ae5f20969a8231b3..6995dc913a155362c4ba740a06728a27c3babdb7 100644 |
--- a/chrome/browser/plugins/plugin_prefs.cc |
+++ b/chrome/browser/plugins/plugin_prefs.cc |
@@ -333,14 +333,13 @@ void PluginPrefs::SetPrefs(PrefService* prefs) { |
ListPrefUpdate update(prefs_, prefs::kPluginsPluginsList); |
base::ListValue* saved_plugins_list = update.Get(); |
if (saved_plugins_list && !saved_plugins_list->empty()) { |
- for (base::Value* plugin_value : *saved_plugins_list) { |
- if (!plugin_value->IsType(base::Value::TYPE_DICTIONARY)) { |
+ for (const auto& plugin_value : *saved_plugins_list) { |
+ base::DictionaryValue* plugin; |
+ if (!plugin_value->GetAsDictionary(&plugin)) { |
LOG(WARNING) << "Invalid entry in " << prefs::kPluginsPluginsList; |
continue; // Oops, don't know what to do with this item. |
} |
- base::DictionaryValue* plugin = |
- static_cast<base::DictionaryValue*>(plugin_value); |
base::string16 group_name; |
bool enabled; |
if (!plugin->GetBoolean("enabled", &enabled)) |