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

Unified Diff: base/prefs/testing_pref_store.cc

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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/testing_pref_store.h ('k') | base/prefs/value_map_pref_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/testing_pref_store.cc
diff --git a/base/prefs/testing_pref_store.cc b/base/prefs/testing_pref_store.cc
index 1a1e6bcd0f5b120c43f6cd1c9b5c418bd7e1e030..2322f4e4768460abfe9309c3f21eca78f49467f2 100644
--- a/base/prefs/testing_pref_store.cc
+++ b/base/prefs/testing_pref_store.cc
@@ -43,18 +43,18 @@ bool TestingPrefStore::IsInitializationComplete() const {
}
void TestingPrefStore::SetValue(const std::string& key,
- base::Value* value,
+ scoped_ptr<base::Value> value,
uint32 flags) {
- if (prefs_.SetValue(key, value)) {
+ if (prefs_.SetValue(key, value.Pass())) {
committed_ = false;
NotifyPrefValueChanged(key);
}
}
void TestingPrefStore::SetValueSilently(const std::string& key,
- base::Value* value,
+ scoped_ptr<base::Value> value,
uint32 flags) {
- if (prefs_.SetValue(key, value))
+ if (prefs_.SetValue(key, value.Pass()))
committed_ = false;
}
@@ -115,15 +115,18 @@ void TestingPrefStore::ReportValueChanged(const std::string& key,
void TestingPrefStore::SetString(const std::string& key,
const std::string& value) {
- SetValue(key, new base::StringValue(value), DEFAULT_PREF_WRITE_FLAGS);
+ SetValue(key, make_scoped_ptr(new base::StringValue(value)),
+ DEFAULT_PREF_WRITE_FLAGS);
}
void TestingPrefStore::SetInteger(const std::string& key, int value) {
- SetValue(key, new base::FundamentalValue(value), DEFAULT_PREF_WRITE_FLAGS);
+ SetValue(key, make_scoped_ptr(new base::FundamentalValue(value)),
+ DEFAULT_PREF_WRITE_FLAGS);
}
void TestingPrefStore::SetBoolean(const std::string& key, bool value) {
- SetValue(key, new base::FundamentalValue(value), DEFAULT_PREF_WRITE_FLAGS);
+ SetValue(key, make_scoped_ptr(new base::FundamentalValue(value)),
+ DEFAULT_PREF_WRITE_FLAGS);
}
bool TestingPrefStore::GetString(const std::string& key,
« no previous file with comments | « base/prefs/testing_pref_store.h ('k') | base/prefs/value_map_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698