Index: chrome/browser/safe_search_api/safe_search_url_checker_unittest.cc |
diff --git a/chrome/browser/safe_search_api/safe_search_url_checker_unittest.cc b/chrome/browser/safe_search_api/safe_search_url_checker_unittest.cc |
index 2d3235aa73850659c96ea65d7346e53c92214052..5d50e08634c035776d5be796b05b158c4ccee110 100644 |
--- a/chrome/browser/safe_search_api/safe_search_url_checker_unittest.cc |
+++ b/chrome/browser/safe_search_api/safe_search_url_checker_unittest.cc |
@@ -13,6 +13,7 @@ |
#include "base/callback.h" |
#include "base/json/json_writer.h" |
#include "base/macros.h" |
+#include "base/memory/ptr_util.h" |
#include "base/message_loop/message_loop.h" |
#include "base/threading/thread_task_runner_handle.h" |
#include "base/values.h" |
@@ -51,9 +52,10 @@ std::string BuildResponse(bool is_porn) { |
new base::DictionaryValue); |
if (is_porn) |
classification_dict->SetBoolean("pornography", is_porn); |
- base::ListValue* classifications_list = new base::ListValue; |
+ auto classifications_list = base::MakeUnique<base::ListValue>(); |
classifications_list->Append(std::move(classification_dict)); |
- dict.SetWithoutPathExpansion("classifications", classifications_list); |
+ dict.SetWithoutPathExpansion("classifications", |
+ std::move(classifications_list)); |
std::string result; |
base::JSONWriter::Write(dict, &result); |
return result; |