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

Unified Diff: chrome/browser/chromeos/settings/cros_settings.cc

Issue 2418833003: Remove use of deprecated base::ListValue::Append(Value*) overload in //chrome/browser/chromeos (Closed)
Patch Set: use-after-move Created 4 years, 2 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: chrome/browser/chromeos/settings/cros_settings.cc
diff --git a/chrome/browser/chromeos/settings/cros_settings.cc b/chrome/browser/chromeos/settings/cros_settings.cc
index c0d7f889b058146cd01071f85ccf271ac4c2fd22..f0a8e715027f0b9ad258f40e734e3915eb4a4650 100644
--- a/chrome/browser/chromeos/settings/cros_settings.cc
+++ b/chrome/browser/chromeos/settings/cros_settings.cc
@@ -152,7 +152,8 @@ void CrosSettings::AppendToList(const std::string& path,
const base::Value* old_value = GetPref(path);
std::unique_ptr<base::Value> new_value(old_value ? old_value->DeepCopy()
: new base::ListValue());
- static_cast<base::ListValue*>(new_value.get())->Append(value->DeepCopy());
+ static_cast<base::ListValue*>(new_value.get())
+ ->Append(value->CreateDeepCopy());
Set(path, *new_value);
}

Powered by Google App Engine
This is Rietveld 408576698