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

Unified Diff: chrome/browser/extensions/api/settings_private/settings_private_delegate.cc

Issue 2051663003: base::ListValue::Append cleanup: pass unique_ptr instead of the released pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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: chrome/browser/extensions/api/settings_private/settings_private_delegate.cc
diff --git a/chrome/browser/extensions/api/settings_private/settings_private_delegate.cc b/chrome/browser/extensions/api/settings_private/settings_private_delegate.cc
index 8395e36b08fed1d267a119e0ebb8d12a6ca4c15a..1b5f72ea522978baa00ccf188be21ef4015ed9a8 100644
--- a/chrome/browser/extensions/api/settings_private/settings_private_delegate.cc
+++ b/chrome/browser/extensions/api/settings_private/settings_private_delegate.cc
@@ -47,7 +47,7 @@ std::unique_ptr<base::Value> SettingsPrivateDelegate::GetAllPrefs() {
for (const auto& it : keys) {
std::unique_ptr<base::Value> pref = GetPref(it.first);
if (!pref->IsType(base::Value::TYPE_NULL))
- prefs->Append(pref.release());
+ prefs->Append(std::move(pref));
}
return std::move(prefs);

Powered by Google App Engine
This is Rietveld 408576698