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 859d307dadf2abee104fe9744dbb099d802b1770..253245fa6af5700d125d4801f6fc7a547822414b 100644 |
--- a/chrome/browser/ui/webui/instant_ui.cc |
+++ b/chrome/browser/ui/webui/instant_ui.cc |
@@ -140,7 +140,7 @@ void InstantUIMessageHandler::GetDebugInfo(const base::ListValue* args) { |
const std::list<DebugEvent>& events = instant->debug_events(); |
base::DictionaryValue data; |
- base::ListValue* entries = new base::ListValue(); |
+ auto entries = base::MakeUnique<base::ListValue>(); |
for (std::list<DebugEvent>::const_iterator it = events.begin(); |
it != events.end(); ++it) { |
std::unique_ptr<base::DictionaryValue> entry(new base::DictionaryValue()); |
@@ -148,7 +148,7 @@ void InstantUIMessageHandler::GetDebugInfo(const base::ListValue* args) { |
entry->SetString("text", it->second); |
entries->Append(std::move(entry)); |
} |
- data.Set("entries", entries); |
+ data.Set("entries", std::move(entries)); |
web_ui()->CallJavascriptFunctionUnsafe("instantConfig.getDebugInfoResult", |
data); |