Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: chrome/browser/plugin_prefs.cc

Issue 7661009: base: Add Is* functions to Value class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tony review Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/plugin_prefs.h" 5 #include "chrome/browser/plugin_prefs.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 force_enable_internal_pdf = true; 210 force_enable_internal_pdf = true;
211 } 211 }
212 212
213 { // Scoped update of prefs::kPluginsPluginsList. 213 { // Scoped update of prefs::kPluginsPluginsList.
214 ListPrefUpdate update(prefs_, prefs::kPluginsPluginsList); 214 ListPrefUpdate update(prefs_, prefs::kPluginsPluginsList);
215 ListValue* saved_plugins_list = update.Get(); 215 ListValue* saved_plugins_list = update.Get();
216 if (saved_plugins_list && !saved_plugins_list->empty()) { 216 if (saved_plugins_list && !saved_plugins_list->empty()) {
217 for (ListValue::const_iterator it = saved_plugins_list->begin(); 217 for (ListValue::const_iterator it = saved_plugins_list->begin();
218 it != saved_plugins_list->end(); 218 it != saved_plugins_list->end();
219 ++it) { 219 ++it) {
220 if (!(*it)->IsType(Value::TYPE_DICTIONARY)) { 220 if (!(*it)->IsDictionary()) {
221 LOG(WARNING) << "Invalid entry in " << prefs::kPluginsPluginsList; 221 LOG(WARNING) << "Invalid entry in " << prefs::kPluginsPluginsList;
222 continue; // Oops, don't know what to do with this item. 222 continue; // Oops, don't know what to do with this item.
223 } 223 }
224 224
225 DictionaryValue* plugin = static_cast<DictionaryValue*>(*it); 225 DictionaryValue* plugin = static_cast<DictionaryValue*>(*it);
226 string16 group_name; 226 string16 group_name;
227 bool enabled; 227 bool enabled;
228 if (!plugin->GetBoolean("enabled", &enabled)) 228 if (!plugin->GetBoolean("enabled", &enabled))
229 enabled = true; 229 enabled = true;
230 230
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, 424 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory,
425 internal_dir, 425 internal_dir,
426 PrefService::UNSYNCABLE_PREF); 426 PrefService::UNSYNCABLE_PREF);
427 prefs->RegisterListPref(prefs::kPluginsDisabledPlugins, 427 prefs->RegisterListPref(prefs::kPluginsDisabledPlugins,
428 PrefService::UNSYNCABLE_PREF); 428 PrefService::UNSYNCABLE_PREF);
429 prefs->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions, 429 prefs->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions,
430 PrefService::UNSYNCABLE_PREF); 430 PrefService::UNSYNCABLE_PREF);
431 prefs->RegisterListPref(prefs::kPluginsEnabledPlugins, 431 prefs->RegisterListPref(prefs::kPluginsEnabledPlugins,
432 PrefService::UNSYNCABLE_PREF); 432 PrefService::UNSYNCABLE_PREF);
433 } 433 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/browser/policy/config_dir_policy_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698