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 c6a4ed29f149f677c111c806c47d343df99e661d..4ec21164548f7dd78fb3efc528842aae0160fbb6 100644 |
--- a/chrome/browser/supervised_user/child_accounts/child_account_service.cc |
+++ b/chrome/browser/supervised_user/child_accounts/child_account_service.cc |
@@ -42,6 +42,19 @@ ChildAccountService::ChildAccountService(Profile* profile) |
ChildAccountService::~ChildAccountService() {} |
+void ChildAccountService::SetIsChildAccount(bool is_child_account) { |
+ if (profile_->IsChild() == is_child_account) |
+ return; |
+ |
+ if (is_child_account) { |
+ profile_->GetPrefs()->SetString(prefs::kSupervisedUserId, |
+ supervised_users::kChildAccountSUID); |
+ } else { |
+ profile_->GetPrefs()->ClearPref(prefs::kSupervisedUserId); |
+ } |
+ PropagateChildStatusToUser(is_child_account); |
+} |
+ |
void ChildAccountService::Init() { |
SigninManagerFactory::GetForProfile(profile_)->AddObserver(this); |
SupervisedUserServiceFactory::GetForProfile(profile_)->SetDelegate(this); |
@@ -236,19 +249,6 @@ void ChildAccountService::OnFlagsFetched( |
SetIsChildAccount(is_child_account); |
} |
-void ChildAccountService::SetIsChildAccount(bool is_child_account) { |
- if (profile_->IsChild() == is_child_account) |
- return; |
- |
- if (is_child_account) { |
- profile_->GetPrefs()->SetString(prefs::kSupervisedUserId, |
- supervised_users::kChildAccountSUID); |
- } else { |
- profile_->GetPrefs()->ClearPref(prefs::kSupervisedUserId); |
- } |
- PropagateChildStatusToUser(is_child_account); |
-} |
- |
void ChildAccountService::PropagateChildStatusToUser(bool is_child) { |
#if defined(OS_CHROMEOS) |
user_manager::User* user = |