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

Unified Diff: base/prefs/json_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/json_pref_store.h ('k') | base/prefs/json_pref_store_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/json_pref_store.cc
diff --git a/base/prefs/json_pref_store.cc b/base/prefs/json_pref_store.cc
index c2ff42593fad0eef46fa7fdba82c6546905d5055..354fd948681b91ef588fa70ca7e23714ed437a82 100644
--- a/base/prefs/json_pref_store.cc
+++ b/base/prefs/json_pref_store.cc
@@ -221,31 +221,29 @@ bool JsonPrefStore::GetMutableValue(const std::string& key,
}
void JsonPrefStore::SetValue(const std::string& key,
- base::Value* value,
+ scoped_ptr<base::Value> value,
uint32 flags) {
DCHECK(CalledOnValidThread());
DCHECK(value);
- scoped_ptr<base::Value> new_value(value);
base::Value* old_value = NULL;
prefs_->Get(key, &old_value);
if (!old_value || !value->Equals(old_value)) {
- prefs_->Set(key, new_value.Pass());
+ prefs_->Set(key, value.Pass());
ReportValueChanged(key, flags);
}
}
void JsonPrefStore::SetValueSilently(const std::string& key,
- base::Value* value,
+ scoped_ptr<base::Value> value,
uint32 flags) {
DCHECK(CalledOnValidThread());
DCHECK(value);
- scoped_ptr<base::Value> new_value(value);
base::Value* old_value = NULL;
prefs_->Get(key, &old_value);
if (!old_value || !value->Equals(old_value)) {
- prefs_->Set(key, new_value.Pass());
+ prefs_->Set(key, value.Pass());
ScheduleWrite(flags);
}
}
« no previous file with comments | « base/prefs/json_pref_store.h ('k') | base/prefs/json_pref_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698