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

Unified Diff: chrome/browser/ui/webui/invalidations_message_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/invalidations_message_handler.cc
diff --git a/chrome/browser/ui/webui/invalidations_message_handler.cc b/chrome/browser/ui/webui/invalidations_message_handler.cc
index 42e15e8724b0e38bcb1b713846f936e7c465d77e..e39453502d7fb569ad5baf6cb3082dd3c6796777 100644
--- a/chrome/browser/ui/webui/invalidations_message_handler.cc
+++ b/chrome/browser/ui/webui/invalidations_message_handler.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/webui/invalidations_message_handler.h"
+#include <utility>
+
#include "base/bind.h"
#include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -102,7 +104,7 @@ void InvalidationsMessageHandler::OnUpdateIds(
dic->SetString("name", (it->first).name());
dic->SetInteger("source", (it->first).source());
dic->SetInteger("totalCount", it->second);
- list_of_objects.Append(dic.release());
+ list_of_objects.Append(std::move(dic));
}
web_ui()->CallJavascriptFunctionUnsafe("chrome.invalidations.updateIds",
base::StringValue(handler_name),

Powered by Google App Engine
This is Rietveld 408576698