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

Unified Diff: chrome/browser/extensions/api/settings_private/prefs_util.cc

Issue 1410993005: Support dictionary prefs in chrome.settingsPrivate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/extensions/api/settings_private.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/settings_private/prefs_util.cc
diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc
index 11612f213ef705b3c6c09681ad2a3bdeb00ac8bc..895c06f581e9febaf2db4b5049c572fc1d4c4bf5 100644
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -177,6 +177,8 @@ settings_private::PrefType PrefsUtil::GetType(const std::string& name,
: settings_private::PrefType::PREF_TYPE_STRING;
case base::Value::Type::TYPE_LIST:
return settings_private::PrefType::PREF_TYPE_LIST;
+ case base::Value::Type::TYPE_DICTIONARY:
+ return settings_private::PrefType::PREF_TYPE_DICTIONARY;
default:
return settings_private::PrefType::PREF_TYPE_NONE;
}
@@ -314,6 +316,7 @@ PrefsUtil::SetPrefResult PrefsUtil::SetPref(const std::string& pref_name,
case base::Value::TYPE_BOOLEAN:
case base::Value::TYPE_DOUBLE:
case base::Value::TYPE_LIST:
+ case base::Value::TYPE_DICTIONARY:
pref_service->Set(pref_name, *value);
break;
case base::Value::TYPE_INTEGER: {
« no previous file with comments | « no previous file | chrome/common/extensions/api/settings_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698