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

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

Issue 1878143002: Convert //chrome/browser/supervised_user from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/supervised_user/child_accounts/child_account_service.cc
diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service.cc b/chrome/browser/supervised_user/child_accounts/child_account_service.cc
index fa292320f30a4e90199baaaf634e4929c6cc5135..ab304a1b08356960586b0bc7ee9ff5681b3e6680 100644
--- a/chrome/browser/supervised_user/child_accounts/child_account_service.cc
+++ b/chrome/browser/supervised_user/child_accounts/child_account_service.cc
@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "base/command_line.h"
#include "base/feature_list.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/field_trial.h"
#include "base/values.h"
#include "build/build_config.h"
@@ -149,13 +150,13 @@ bool ChildAccountService::SetActive(bool active) {
// In contrast to legacy SUs, child account SUs must sign in.
settings_service->SetLocalSetting(
supervised_users::kSigninAllowed,
- make_scoped_ptr(new base::FundamentalValue(true)));
+ base::WrapUnique(new base::FundamentalValue(true)));
// SafeSearch is controlled at the account level, so don't override it
// client-side.
settings_service->SetLocalSetting(
supervised_users::kForceSafeSearch,
- make_scoped_ptr(new base::FundamentalValue(false)));
+ base::WrapUnique(new base::FundamentalValue(false)));
#if !defined(OS_CHROMEOS)
// This is also used by user policies (UserPolicySigninService), but since
// child accounts can not also be Dasher accounts, there shouldn't be any
@@ -179,7 +180,7 @@ bool ChildAccountService::SetActive(bool active) {
SupervisedUserSettingsService* settings_service =
SupervisedUserSettingsServiceFactory::GetForProfile(profile_);
settings_service->SetLocalSetting(supervised_users::kSigninAllowed,
- scoped_ptr<base::Value>());
+ std::unique_ptr<base::Value>());
#if !defined(OS_CHROMEOS)
SigninManagerFactory::GetForProfile(profile_)->ProhibitSignout(false);
#endif

Powered by Google App Engine
This is Rietveld 408576698