| Index: ash/system/chromeos/supervised/tray_supervised_user.cc
|
| diff --git a/ash/system/chromeos/supervised/tray_supervised_user.cc b/ash/system/chromeos/supervised/tray_supervised_user.cc
|
| index 31ddb39b299836c79801a72b2a12a4854887e12e..f85d0fe5df9d9dc4b13cfe71a090b7b8c7c429de 100644
|
| --- a/ash/system/chromeos/supervised/tray_supervised_user.cc
|
| +++ b/ash/system/chromeos/supervised/tray_supervised_user.cc
|
| @@ -29,8 +29,7 @@
|
| TraySupervisedUser::TraySupervisedUser(SystemTray* system_tray)
|
| : SystemTrayItem(system_tray),
|
| tray_view_(NULL),
|
| - status_(ash::user::LOGGED_IN_NONE),
|
| - is_user_supervised_(false) {
|
| + status_(ash::user::LOGGED_IN_NONE) {
|
| }
|
|
|
| TraySupervisedUser::~TraySupervisedUser() {
|
| @@ -49,8 +48,7 @@
|
| views::View* TraySupervisedUser::CreateDefaultView(
|
| user::LoginStatus status) {
|
| CHECK(tray_view_ == NULL);
|
| - SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
|
| - if (!delegate->IsUserSupervised())
|
| + if (status != ash::user::LOGGED_IN_SUPERVISED)
|
| return NULL;
|
|
|
| tray_view_ = new LabelTrayView(this, IDR_AURA_UBER_TRAY_SUPERVISED_USER);
|
| @@ -68,18 +66,14 @@
|
|
|
| void TraySupervisedUser::UpdateAfterLoginStatusChange(
|
| user::LoginStatus status) {
|
| - SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
|
| -
|
| - bool is_user_supervised = delegate->IsUserSupervised();
|
| - if (status == status_ && is_user_supervised == is_user_supervised_)
|
| + if (status == status_)
|
| return;
|
| -
|
| - if (is_user_supervised &&
|
| + if (status == ash::user::LOGGED_IN_SUPERVISED &&
|
| status_ != ash::user::LOGGED_IN_LOCKED) {
|
| + SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
|
| CreateOrUpdateNotification(delegate->GetSupervisedUserMessage());
|
| }
|
| status_ = status;
|
| - is_user_supervised_ = is_user_supervised;
|
| }
|
|
|
| void TraySupervisedUser::CreateOrUpdateNotification(
|
|
|