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

Unified Diff: chrome/browser/ui/webui/options/core_options_handler.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/ui/webui/options/core_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/core_options_handler.cc b/chrome/browser/ui/webui/options/core_options_handler.cc
index dbe9310aef8e4cb813110708f8da7a098fff2ac4..ae9d4a89d1f8acffa697e128f5e1d416c1240612 100644
--- a/chrome/browser/ui/webui/options/core_options_handler.cc
+++ b/chrome/browser/ui/webui/options/core_options_handler.cc
@@ -358,7 +358,7 @@ void CoreOptionsHandler::DispatchPrefChangeNotification(
pref_callback_map_.equal_range(name);
base::ListValue result_value;
result_value.AppendString(name);
- result_value.Append(value.release());
+ result_value.Append(std::move(value));
for (PreferenceCallbackMap::const_iterator iter = range.first;
iter != range.second; ++iter) {
const std::string& callback_function = iter->second;

Powered by Google App Engine
This is Rietveld 408576698