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

Unified Diff: base/prefs/json_pref_store.cc

Issue 1129083003: More base::Values-related bare pointer -> scoped_ptr conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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: base/prefs/json_pref_store.cc
diff --git a/base/prefs/json_pref_store.cc b/base/prefs/json_pref_store.cc
index 8ce59745536d02fe4af6279a3d85312966a34937..be49d22e9cb8c0cc932c3df565c59c8d0a62229d 100644
--- a/base/prefs/json_pref_store.cc
+++ b/base/prefs/json_pref_store.cc
@@ -236,7 +236,7 @@ void JsonPrefStore::SetValue(const std::string& key,
base::Value* old_value = NULL;
prefs_->Get(key, &old_value);
if (!old_value || !value->Equals(old_value)) {
- prefs_->Set(key, new_value.release());
+ prefs_->Set(key, new_value.Pass());
ReportValueChanged(key, flags);
}
}
@@ -251,7 +251,7 @@ void JsonPrefStore::SetValueSilently(const std::string& key,
base::Value* old_value = NULL;
prefs_->Get(key, &old_value);
if (!old_value || !value->Equals(old_value)) {
- prefs_->Set(key, new_value.release());
+ prefs_->Set(key, new_value.Pass());
if (!read_only_)
writer_.ScheduleWrite(this);
}

Powered by Google App Engine
This is Rietveld 408576698