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

Unified Diff: components/pref_registry/pref_registry_syncable.cc

Issue 383263005: Remove more CreateIntegerValue calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/SetBoolean/SetInteger Created 6 years, 5 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
Index: components/pref_registry/pref_registry_syncable.cc
diff --git a/components/pref_registry/pref_registry_syncable.cc b/components/pref_registry/pref_registry_syncable.cc
index 675b30915529723ab0a679211ce2c9874f18a8dc..d3d0719de07e6db7b64c2b2fcc2e18d2f869ed9d 100644
--- a/components/pref_registry/pref_registry_syncable.cc
+++ b/components/pref_registry/pref_registry_syncable.cc
@@ -34,7 +34,7 @@ base::Value* CreateLocaleDefaultValue(base::Value::Type type,
case base::Value::TYPE_INTEGER: {
int val;
base::StringToInt(resource_string, &val);
- return base::Value::CreateIntegerValue(val);
+ return new base::FundamentalValue(val);
}
case base::Value::TYPE_DOUBLE: {
@@ -85,9 +85,8 @@ void PrefRegistrySyncable::RegisterBooleanPref(const char* path,
void PrefRegistrySyncable::RegisterIntegerPref(const char* path,
int default_value,
PrefSyncStatus sync_status) {
- RegisterSyncablePreference(path,
- base::Value::CreateIntegerValue(default_value),
- sync_status);
+ RegisterSyncablePreference(
+ path, new base::FundamentalValue(default_value), sync_status);
}
void PrefRegistrySyncable::RegisterDoublePref(const char* path,
« no previous file with comments | « components/policy/tools/generate_policy_source.py ('k') | components/search_engines/default_search_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698