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

Unified Diff: components/pref_registry/pref_registry_syncable.cc

Issue 388963002: Get rid of the rest of CreateStringValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad 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 18c26604bee973dcc77c56d353210da4a22d638d..6343e550bf7cfa474f8da90a8741f8b478a05d12 100644
--- a/components/pref_registry/pref_registry_syncable.cc
+++ b/components/pref_registry/pref_registry_syncable.cc
@@ -44,7 +44,7 @@ base::Value* CreateLocaleDefaultValue(base::Value::Type type,
}
case base::Value::TYPE_STRING: {
- return base::Value::CreateStringValue(resource_string);
+ return new base::StringValue(resource_string);
}
default: {
@@ -99,19 +99,16 @@ void PrefRegistrySyncable::RegisterDoublePref(const char* path,
void PrefRegistrySyncable::RegisterStringPref(const char* path,
const std::string& default_value,
PrefSyncStatus sync_status) {
- RegisterSyncablePreference(path,
- base::Value::CreateStringValue(default_value),
- sync_status);
+ RegisterSyncablePreference(
+ path, new base::StringValue(default_value), sync_status);
}
void PrefRegistrySyncable::RegisterFilePathPref(
const char* path,
const base::FilePath& default_value,
PrefSyncStatus sync_status) {
- RegisterSyncablePreference(path,
- base::Value::CreateStringValue(
- default_value.value()),
- sync_status);
+ RegisterSyncablePreference(
+ path, new base::StringValue(default_value.value()), sync_status);
}
void PrefRegistrySyncable::RegisterListPref(const char* path,
@@ -187,7 +184,7 @@ void PrefRegistrySyncable::RegisterInt64Pref(
PrefSyncStatus sync_status) {
RegisterSyncablePreference(
path,
- base::Value::CreateStringValue(base::Int64ToString(default_value)),
+ new base::StringValue(base::Int64ToString(default_value)),
sync_status);
}
@@ -197,7 +194,7 @@ void PrefRegistrySyncable::RegisterUint64Pref(
PrefSyncStatus sync_status) {
RegisterSyncablePreference(
path,
- base::Value::CreateStringValue(base::Uint64ToString(default_value)),
+ new base::StringValue(base::Uint64ToString(default_value)),
sync_status);
}
« no previous file with comments | « components/policy/tools/generate_policy_source.py ('k') | components/search_engines/default_search_policy_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698