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

Side by Side Diff: chrome/browser/supervised_user/child_accounts/child_account_service.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" 5 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/feature_list.h" 9 #include "base/feature_list.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 if (active_ == active) 138 if (active_ == active)
139 return true; 139 return true;
140 active_ = active; 140 active_ = active;
141 141
142 if (active_) { 142 if (active_) {
143 SupervisedUserSettingsService* settings_service = 143 SupervisedUserSettingsService* settings_service =
144 SupervisedUserSettingsServiceFactory::GetForProfile(profile_); 144 SupervisedUserSettingsServiceFactory::GetForProfile(profile_);
145 145
146 settings_service->SetLocalSetting( 146 settings_service->SetLocalSetting(
147 supervised_users::kRecordHistoryIncludesSessionSync, 147 supervised_users::kRecordHistoryIncludesSessionSync,
148 base::MakeUnique<base::FundamentalValue>(false)); 148 base::MakeUnique<base::Value>(false));
149 149
150 // In contrast to legacy SUs, child account SUs must sign in. 150 // In contrast to legacy SUs, child account SUs must sign in.
151 settings_service->SetLocalSetting( 151 settings_service->SetLocalSetting(
152 supervised_users::kSigninAllowed, 152 supervised_users::kSigninAllowed,
153 base::MakeUnique<base::FundamentalValue>(true)); 153 base::MakeUnique<base::Value>(true));
154 154
155 // SafeSearch is controlled at the account level, so don't override it 155 // SafeSearch is controlled at the account level, so don't override it
156 // client-side. 156 // client-side.
157 settings_service->SetLocalSetting( 157 settings_service->SetLocalSetting(
158 supervised_users::kForceSafeSearch, 158 supervised_users::kForceSafeSearch,
159 base::MakeUnique<base::FundamentalValue>(false)); 159 base::MakeUnique<base::Value>(false));
160 160
161 #if !defined(OS_CHROMEOS) 161 #if !defined(OS_CHROMEOS)
162 // This is also used by user policies (UserPolicySigninService), but since 162 // This is also used by user policies (UserPolicySigninService), but since
163 // child accounts can not also be Dasher accounts, there shouldn't be any 163 // child accounts can not also be Dasher accounts, there shouldn't be any
164 // problems. 164 // problems.
165 SigninManagerFactory::GetForProfile(profile_)->ProhibitSignout(true); 165 SigninManagerFactory::GetForProfile(profile_)->ProhibitSignout(true);
166 #endif 166 #endif
167 167
168 // TODO(treib): Maybe store the last update time in a pref, so we don't 168 // TODO(treib): Maybe store the last update time in a pref, so we don't
169 // have to re-fetch on every start. 169 // have to re-fetch on every start.
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 } 335 }
336 336
337 void ChildAccountService::ClearSecondCustodianPrefs() { 337 void ChildAccountService::ClearSecondCustodianPrefs() {
338 profile_->GetPrefs()->ClearPref(prefs::kSupervisedUserSecondCustodianName); 338 profile_->GetPrefs()->ClearPref(prefs::kSupervisedUserSecondCustodianName);
339 profile_->GetPrefs()->ClearPref(prefs::kSupervisedUserSecondCustodianEmail); 339 profile_->GetPrefs()->ClearPref(prefs::kSupervisedUserSecondCustodianEmail);
340 profile_->GetPrefs()->ClearPref( 340 profile_->GetPrefs()->ClearPref(
341 prefs::kSupervisedUserSecondCustodianProfileURL); 341 prefs::kSupervisedUserSecondCustodianProfileURL);
342 profile_->GetPrefs()->ClearPref( 342 profile_->GetPrefs()->ClearPref(
343 prefs::kSupervisedUserSecondCustodianProfileImageURL); 343 prefs::kSupervisedUserSecondCustodianProfileImageURL);
344 } 344 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698