| Index: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
|
| diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
|
| index b176b964197d999c0d84c4cf30014c9de291d1dc..edbf0cc91a3e3041361e784ff3236c0f87cc8fff 100644
|
| --- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
|
| +++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
|
| @@ -113,6 +113,11 @@ bool IsSessionInSecondaryLoginScreen() {
|
| return session_manager::SessionManager::Get()->IsInSecondaryLoginScreen();
|
| }
|
|
|
| +bool IsUserSupervised() {
|
| + user_manager::User* user = user_manager::UserManager::Get()->GetActiveUser();
|
| + return user && user->IsSupervised();
|
| +}
|
| +
|
| } // namespace
|
|
|
| SystemTrayDelegateChromeOS::SystemTrayDelegateChromeOS()
|
| @@ -234,20 +239,11 @@ base::string16 SystemTrayDelegateChromeOS::GetSupervisedUserMessage()
|
| const {
|
| if (!IsUserSupervised())
|
| return base::string16();
|
| - if (IsUserChild())
|
| + if (user_manager::UserManager::Get()->IsLoggedInAsChildUser())
|
| return GetChildUserMessage();
|
| return GetLegacySupervisedUserMessage();
|
| }
|
|
|
| -bool SystemTrayDelegateChromeOS::IsUserSupervised() const {
|
| - user_manager::User* user = user_manager::UserManager::Get()->GetActiveUser();
|
| - return user && user->IsSupervised();
|
| -}
|
| -
|
| -bool SystemTrayDelegateChromeOS::IsUserChild() const {
|
| - return user_manager::UserManager::Get()->IsLoggedInAsChildUser();
|
| -}
|
| -
|
| void SystemTrayDelegateChromeOS::ShowEnterpriseInfo() {
|
| // TODO(mash): Refactor out SessionStateDelegate and move to SystemTrayClient.
|
| ash::LoginStatus status = GetUserLoginStatus();
|
| @@ -695,6 +691,8 @@ SystemTrayDelegateChromeOS::GetLegacySupervisedUserMessage() const {
|
| const base::string16
|
| SystemTrayDelegateChromeOS::GetChildUserMessage() const {
|
| #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
| + // TODO(jamescook): If supervised users are always enabled on Chrome OS then
|
| + // these ifdefs can be removed.
|
| SupervisedUserService* service =
|
| SupervisedUserServiceFactory::GetForProfile(user_profile_);
|
| base::string16 first_custodian =
|
|
|