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

Unified Diff: rlz/chromeos/lib/rlz_value_store_chromeos.cc

Issue 2911033002: Remove raw base::DictionaryValue::Set (Closed)
Patch Set: Proper Windows Fix Created 3 years, 6 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: rlz/chromeos/lib/rlz_value_store_chromeos.cc
diff --git a/rlz/chromeos/lib/rlz_value_store_chromeos.cc b/rlz/chromeos/lib/rlz_value_store_chromeos.cc
index 65b56344a1054973123f89f45e64e33257911b7b..1de9f6931de32d30a7e80c1b51271e8e217f1d30 100644
--- a/rlz/chromeos/lib/rlz_value_store_chromeos.cc
+++ b/rlz/chromeos/lib/rlz_value_store_chromeos.cc
@@ -250,8 +250,8 @@ bool RlzValueStoreChromeOS::AddValueToList(const std::string& list_name,
std::unique_ptr<base::Value> value) {
base::ListValue* list_value = NULL;
if (!rlz_store_->GetList(list_name, &list_value)) {
- list_value = new base::ListValue;
- rlz_store_->Set(list_name, list_value);
+ list_value =
+ rlz_store_->SetList(list_name, base::MakeUnique<base::ListValue>());
}
list_value->AppendIfNotPresent(std::move(value));
return true;
« no previous file with comments | « remoting/host/setup/me2me_native_messaging_host.cc ('k') | services/preferences/tracked/dictionary_hash_store_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698