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

Unified Diff: chrome/browser/ui/webui/flash_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/cookies_tree_model_util.cc ('k') | chrome/browser/ui/webui/instant_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/flash_ui.cc
diff --git a/chrome/browser/ui/webui/flash_ui.cc b/chrome/browser/ui/webui/flash_ui.cc
index 789a9d03538ae88af73e6e15394e24891383f294..07b04e5e1c5172760ebc53d46bd136ffa5f180c2 100644
--- a/chrome/browser/ui/webui/flash_ui.cc
+++ b/chrome/browser/ui/webui/flash_ui.cc
@@ -7,7 +7,9 @@
#include <stddef.h>
#include <map>
+#include <memory>
#include <string>
+#include <utility>
#include <vector>
#include "base/bind.h"
@@ -187,10 +189,10 @@ void FlashDOMHandler::OnUploadListAvailable() {
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));
}
void AddPair(base::ListValue* list,
« no previous file with comments | « chrome/browser/ui/webui/cookies_tree_model_util.cc ('k') | chrome/browser/ui/webui/instant_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698