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

Unified Diff: chrome/browser/ui/webui/instant_ui.cc

Issue 2058233002: Rewrite simple uses of base::ListValue::Append() taking a raw pointer var. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: less comments more ownership 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
« no previous file with comments | « chrome/browser/ui/webui/flash_ui.cc ('k') | chrome/browser/ui/webui/nacl_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/instant_ui.cc
diff --git a/chrome/browser/ui/webui/instant_ui.cc b/chrome/browser/ui/webui/instant_ui.cc
index 3a71bea3aa0a3abe2986bd1d5ab8d98328aa90e5..b2d8e296eb98d91cb498ecd37c30e5fb845a4dec 100644
--- a/chrome/browser/ui/webui/instant_ui.cc
+++ b/chrome/browser/ui/webui/instant_ui.cc
@@ -6,6 +6,9 @@
#include <stdint.h>
+#include <memory>
+#include <utility>
+
#include "base/bind.h"
#include "base/macros.h"
#include "base/strings/stringprintf.h"
@@ -136,10 +139,10 @@ void InstantUIMessageHandler::GetDebugInfo(const base::ListValue* args) {
base::ListValue* entries = new base::ListValue();
for (std::list<DebugEvent>::const_iterator it = events.begin();
it != events.end(); ++it) {
- base::DictionaryValue* entry = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> entry(new base::DictionaryValue());
entry->SetString("time", FormatTime(it->first));
entry->SetString("text", it->second);
- entries->Append(entry);
+ entries->Append(std::move(entry));
}
data.Set("entries", entries);
« no previous file with comments | « chrome/browser/ui/webui/flash_ui.cc ('k') | chrome/browser/ui/webui/nacl_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698