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

Unified Diff: chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.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
Index: chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc
diff --git a/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc b/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc
index 761ff406b7bb787787780ae118a3951eec53a808..a9e8ec0244d8e69cacade09613957a502852ef3a 100644
--- a/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc
+++ b/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc
@@ -5,6 +5,8 @@
#include "chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.h"
#include <map>
+#include <memory>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -47,11 +49,11 @@ void ConvertExtensionStatusToDictionary(
if (!extension)
continue;
- base::DictionaryValue* dict = new base::DictionaryValue;
+ std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
dict->SetString("extensionID", extension_id);
dict->SetString("extensionName", extension->name());
dict->SetString("status", itr->second);
- list.Append(dict);
+ list.Append(std::move(dict));
}
callback.Run(list);

Powered by Google App Engine
This is Rietveld 408576698