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

Unified Diff: components/pref_registry/pref_registry_syncable.cc

Issue 390233003: Decrement CreateDoubleValue count (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 6343e550bf7cfa474f8da90a8741f8b478a05d12..1edcb1ea518bb37d2bb89b3bd952d846fbae0b39 100644
--- a/components/pref_registry/pref_registry_syncable.cc
+++ b/components/pref_registry/pref_registry_syncable.cc
@@ -40,7 +40,7 @@ base::Value* CreateLocaleDefaultValue(base::Value::Type type,
case base::Value::TYPE_DOUBLE: {
double val;
base::StringToDouble(resource_string, &val);
- return base::Value::CreateDoubleValue(val);
+ return new base::FundamentalValue(val);
}
case base::Value::TYPE_STRING: {
@@ -91,9 +91,8 @@ void PrefRegistrySyncable::RegisterIntegerPref(const char* path,
void PrefRegistrySyncable::RegisterDoublePref(const char* path,
double default_value,
PrefSyncStatus sync_status) {
- RegisterSyncablePreference(path,
- base::Value::CreateDoubleValue(default_value),
- sync_status);
+ RegisterSyncablePreference(
+ path, new base::FundamentalValue(default_value), sync_status);
}
void PrefRegistrySyncable::RegisterStringPref(const char* path,
« no previous file with comments | « components/policy/core/common/schema_unittest.cc ('k') | tools/json_schema_compiler/test/arrays_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698