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

Unified Diff: chrome/browser/ui/webui/browsing_history_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/browsing_history_handler.cc
diff --git a/chrome/browser/ui/webui/browsing_history_handler.cc b/chrome/browser/ui/webui/browsing_history_handler.cc
index e2aa3bbabd0a38e848744c34116d7be00700f0e8..82fd5d3d41b5df437572e4ce61b1bb57ee526ea2 100644
--- a/chrome/browser/ui/webui/browsing_history_handler.cc
+++ b/chrome/browser/ui/webui/browsing_history_handler.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
#include <set>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -705,7 +706,7 @@ void BrowsingHistoryHandler::ReturnResultsToFrontEnd() {
query_results_.begin(); it != query_results_.end(); ++it) {
std::unique_ptr<base::Value> value(
it->ToValue(bookmark_model, supervised_user_service, sync_service));
- results_value.Append(value.release());
+ results_value.Append(std::move(value));
}
web_ui()->CallJavascriptFunctionUnsafe("historyResult", results_info_value_,

Powered by Google App Engine
This is Rietveld 408576698