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

Unified Diff: base/prefs/pref_service.cc

Issue 131503015: Get rid of some uses of base::Create*Value (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more Created 6 years, 11 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 | « base/prefs/pref_registry_simple.cc ('k') | base/prefs/pref_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/pref_service.cc
diff --git a/base/prefs/pref_service.cc b/base/prefs/pref_service.cc
index 576043b54894913fa40491057f91fc12b954f811..8a2c742109b3262261f98c58d1c6a659e5a08e60 100644
--- a/base/prefs/pref_service.cc
+++ b/base/prefs/pref_service.cc
@@ -336,19 +336,19 @@ void PrefService::Set(const char* path, const base::Value& value) {
}
void PrefService::SetBoolean(const char* path, bool value) {
- SetUserPrefValue(path, base::Value::CreateBooleanValue(value));
+ SetUserPrefValue(path, new base::FundamentalValue(value));
}
void PrefService::SetInteger(const char* path, int value) {
- SetUserPrefValue(path, base::Value::CreateIntegerValue(value));
+ SetUserPrefValue(path, new base::FundamentalValue(value));
}
void PrefService::SetDouble(const char* path, double value) {
- SetUserPrefValue(path, base::Value::CreateDoubleValue(value));
+ SetUserPrefValue(path, new base::FundamentalValue(value));
}
void PrefService::SetString(const char* path, const std::string& value) {
- SetUserPrefValue(path, base::Value::CreateStringValue(value));
+ SetUserPrefValue(path, new base::StringValue(value));
}
void PrefService::SetFilePath(const char* path, const base::FilePath& value) {
@@ -356,8 +356,7 @@ void PrefService::SetFilePath(const char* path, const base::FilePath& value) {
}
void PrefService::SetInt64(const char* path, int64 value) {
- SetUserPrefValue(path,
- base::Value::CreateStringValue(base::Int64ToString(value)));
+ SetUserPrefValue(path, new base::StringValue(base::Int64ToString(value)));
}
int64 PrefService::GetInt64(const char* path) const {
@@ -378,8 +377,7 @@ int64 PrefService::GetInt64(const char* path) const {
}
void PrefService::SetUint64(const char* path, uint64 value) {
- SetUserPrefValue(path,
- base::Value::CreateStringValue(base::Uint64ToString(value)));
+ SetUserPrefValue(path, new base::StringValue(base::Uint64ToString(value)));
}
uint64 PrefService::GetUint64(const char* path) const {
« no previous file with comments | « base/prefs/pref_registry_simple.cc ('k') | base/prefs/pref_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698