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

Unified Diff: chrome/browser/supervised_user/child_accounts/family_info_fetcher_unittest.cc

Issue 2378083002: Replace deprecated version of SetWithoutPathExpansion() (Closed)
Patch Set: restored background directory file Created 4 years, 2 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 | « AUTHORS ('k') | chrome/browser/supervised_user/legacy/supervised_user_sync_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/supervised_user/child_accounts/family_info_fetcher_unittest.cc
diff --git a/chrome/browser/supervised_user/child_accounts/family_info_fetcher_unittest.cc b/chrome/browser/supervised_user/child_accounts/family_info_fetcher_unittest.cc
index 5622064f0736318f1a59489394d937ff69852252..37ff63961ab1159a5e6487523ee95d298eb04755 100644
--- a/chrome/browser/supervised_user/child_accounts/family_info_fetcher_unittest.cc
+++ b/chrome/browser/supervised_user/child_accounts/family_info_fetcher_unittest.cc
@@ -12,6 +12,7 @@
#include <vector>
#include "base/json/json_writer.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"
@@ -49,9 +50,10 @@ std::string BuildGetFamilyProfileResponse(
base::DictionaryValue dict;
base::DictionaryValue* family_dict = new base::DictionaryValue;
family_dict->SetStringWithoutPathExpansion("familyId", family.id);
- base::DictionaryValue* profile_dict = new base::DictionaryValue;
+ std::unique_ptr<base::DictionaryValue> profile_dict =
+ base::MakeUnique<base::DictionaryValue>();
profile_dict->SetStringWithoutPathExpansion("name", family.name);
- family_dict->SetWithoutPathExpansion("profile", profile_dict);
+ family_dict->SetWithoutPathExpansion("profile", std::move(profile_dict));
dict.SetWithoutPathExpansion("family", family_dict);
std::string result;
base::JSONWriter::Write(dict, &result);
« no previous file with comments | « AUTHORS ('k') | chrome/browser/supervised_user/legacy/supervised_user_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698