Index: chrome/browser/extensions/install_signer.cc |
diff --git a/chrome/browser/extensions/install_signer.cc b/chrome/browser/extensions/install_signer.cc |
index 065a544b3c85799c3059c3f9dd9d312284f8de92..d96ad631e75613fe4d03b6698bac913ce1ffc0dc 100644 |
--- a/chrome/browser/extensions/install_signer.cc |
+++ b/chrome/browser/extensions/install_signer.cc |
@@ -15,6 +15,7 @@ |
#include "base/json/json_writer.h" |
#include "base/lazy_instance.h" |
#include "base/macros.h" |
+#include "base/memory/ptr_util.h" |
#include "base/message_loop/message_loop.h" |
#include "base/metrics/histogram_macros.h" |
#include "base/process/process_info.h" |
@@ -125,10 +126,10 @@ bool ValidateExpireDateFormat(const std::string& input) { |
void SetExtensionIdSet(base::DictionaryValue* dictionary, |
const char* key, |
const ExtensionIdSet& ids) { |
- base::ListValue* id_list = new base::ListValue(); |
+ auto id_list = base::MakeUnique<base::ListValue>(); |
for (ExtensionIdSet::const_iterator i = ids.begin(); i != ids.end(); ++i) |
id_list->AppendString(*i); |
- dictionary->Set(key, id_list); |
+ dictionary->Set(key, std::move(id_list)); |
} |
// Tries to fetch a list of strings from |dictionay| for |key|, and inserts |
@@ -390,7 +391,7 @@ void InstallSigner::GetSignature(const SignatureCallback& callback) { |
for (ExtensionIdSet::const_iterator i = ids_.begin(); i != ids_.end(); ++i) { |
id_list->AppendString(*i); |
} |
- dictionary.Set(kIdsKey, id_list.release()); |
+ dictionary.Set(kIdsKey, std::move(id_list)); |
std::string json; |
base::JSONWriter::Write(dictionary, &json); |
if (json.empty()) { |