OLD | NEW |
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 std::unique_ptr<base::Value>()); | 188 std::unique_ptr<base::Value>()); |
189 #if !defined(OS_CHROMEOS) | 189 #if !defined(OS_CHROMEOS) |
190 SigninManagerFactory::GetForProfile(profile_)->ProhibitSignout(false); | 190 SigninManagerFactory::GetForProfile(profile_)->ProhibitSignout(false); |
191 #endif | 191 #endif |
192 | 192 |
193 CancelFetchingFamilyInfo(); | 193 CancelFetchingFamilyInfo(); |
194 } | 194 } |
195 | 195 |
196 // Trigger a sync reconfig to enable/disable the right SU data types. | 196 // Trigger a sync reconfig to enable/disable the right SU data types. |
197 // The logic to do this lives in the SupervisedUserSyncDataTypeController. | 197 // The logic to do this lives in the SupervisedUserSyncDataTypeController. |
198 ProfileSyncService* sync_service = | 198 browser_sync::ProfileSyncService* sync_service = |
199 ProfileSyncServiceFactory::GetForProfile(profile_); | 199 ProfileSyncServiceFactory::GetForProfile(profile_); |
200 if (sync_service->IsFirstSetupComplete()) | 200 if (sync_service->IsFirstSetupComplete()) |
201 sync_service->ReconfigureDatatypeManager(); | 201 sync_service->ReconfigureDatatypeManager(); |
202 | 202 |
203 return true; | 203 return true; |
204 } | 204 } |
205 | 205 |
206 void ChildAccountService::SetIsChildAccount(bool is_child_account) { | 206 void ChildAccountService::SetIsChildAccount(bool is_child_account) { |
207 PropagateChildStatusToUser(is_child_account); | 207 PropagateChildStatusToUser(is_child_account); |
208 if (profile_->IsChild() != is_child_account) { | 208 if (profile_->IsChild() != is_child_account) { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 } | 339 } |
340 | 340 |
341 void ChildAccountService::ClearSecondCustodianPrefs() { | 341 void ChildAccountService::ClearSecondCustodianPrefs() { |
342 profile_->GetPrefs()->ClearPref(prefs::kSupervisedUserSecondCustodianName); | 342 profile_->GetPrefs()->ClearPref(prefs::kSupervisedUserSecondCustodianName); |
343 profile_->GetPrefs()->ClearPref(prefs::kSupervisedUserSecondCustodianEmail); | 343 profile_->GetPrefs()->ClearPref(prefs::kSupervisedUserSecondCustodianEmail); |
344 profile_->GetPrefs()->ClearPref( | 344 profile_->GetPrefs()->ClearPref( |
345 prefs::kSupervisedUserSecondCustodianProfileURL); | 345 prefs::kSupervisedUserSecondCustodianProfileURL); |
346 profile_->GetPrefs()->ClearPref( | 346 profile_->GetPrefs()->ClearPref( |
347 prefs::kSupervisedUserSecondCustodianProfileImageURL); | 347 prefs::kSupervisedUserSecondCustodianProfileImageURL); |
348 } | 348 } |
OLD | NEW |