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

Unified Diff: chrome/browser/safe_search_api/safe_search_url_checker_unittest.cc

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error Created 3 years, 8 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/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;
« no previous file with comments | « chrome/browser/safe_browsing/incident_reporting/state_store.cc ('k') | chrome/browser/signin/easy_unlock_service_regular.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698