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

Unified Diff: chrome/browser/ui/webui/copresence_ui_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/copresence_ui_handler.cc
diff --git a/chrome/browser/ui/webui/copresence_ui_handler.cc b/chrome/browser/ui/webui/copresence_ui_handler.cc
index 9373064a5e3cbe425e484f3419c908d5774cd954..4922a068425203db6953d14232e0b43da411772c 100644
--- a/chrome/browser/ui/webui/copresence_ui_handler.cc
+++ b/chrome/browser/ui/webui/copresence_ui_handler.cc
@@ -6,6 +6,7 @@
#include <map>
#include <string>
+#include <utility>
#include <vector>
#include "base/bind.h"
@@ -168,7 +169,7 @@ void CopresenceUIHandler::DirectivesUpdated() {
ui::TimeFormat::LENGTH_LONG,
base::TimeDelta::FromMilliseconds(directive.ttl_millis())));
- js_directives.Append(js_directive.release());
+ js_directives.Append(std::move(js_directive));
}
web_ui()->CallJavascriptFunctionUnsafe("refreshDirectives", js_directives);

Powered by Google App Engine
This is Rietveld 408576698