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

Unified Diff: chrome/browser/ui/webui/nacl_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/instant_ui.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/nacl_ui.cc
diff --git a/chrome/browser/ui/webui/nacl_ui.cc b/chrome/browser/ui/webui/nacl_ui.cc
index 79fe16e5e1bd91840e0581e5b1138e6fd3e7a7aa..f153fccba36b364233c01f45fabebb0e07350881 100644
--- a/chrome/browser/ui/webui/nacl_ui.cc
+++ b/chrome/browser/ui/webui/nacl_ui.cc
@@ -6,7 +6,9 @@
#include <stddef.h>
+#include <memory>
#include <string>
+#include <utility>
#include <vector>
#include "base/bind.h"
@@ -159,10 +161,10 @@ void NaClDomHandler::RegisterMessages() {
void AddPair(base::ListValue* list,
const base::string16& key,
const base::string16& value) {
- base::DictionaryValue* results = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> results(new base::DictionaryValue());
results->SetString("key", key);
results->SetString("value", value);
- list->Append(results);
+ list->Append(std::move(results));
}
// Generate an empty data-pair which acts as a line break.
« no previous file with comments | « chrome/browser/ui/webui/instant_ui.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698