diff --git a/ash/system/supervised/tray_supervised_user.cc b/ash/system/supervised/tray_supervised_user.cc index ca850f0ddce681..8c62331c05c9cb 100644 --- a/ash/system/supervised/tray_supervised_user.cc +++ b/ash/system/supervised/tray_supervised_user.cc @@ -62,9 +62,16 @@ views::View* TraySupervisedUser::CreateDefaultView(LoginStatus status) { return tray_view; } +void TraySupervisedUser::OnActiveUserSessionChanged( + const AccountId& account_id) { + OnUserSessionUpdated(account_id); +} + +void TraySupervisedUser::OnUserSessionAdded(const AccountId& account_id) { + OnUserSessionUpdated(account_id); +} + void TraySupervisedUser::OnUserSessionUpdated(const AccountId& account_id) { - // NOTE: This doesn't use OnUserSessionAdded() because the custodian info - // isn't available until after the session starts. SessionController* session_controller = Shell::Get()->session_controller(); if (!session_controller->IsUserSupervised()) return; diff --git a/ash/system/supervised/tray_supervised_user.h b/ash/system/supervised/tray_supervised_user.h index dd0429221b103f..3d833638d4995b 100644 --- a/ash/system/supervised/tray_supervised_user.h +++ b/ash/system/supervised/tray_supervised_user.h @@ -28,6 +28,8 @@ class ASH_EXPORT TraySupervisedUser : public SystemTrayItem, views::View* CreateDefaultView(LoginStatus status) override; // SessionObserver: + void OnActiveUserSessionChanged(const AccountId& account_id) override; + void OnUserSessionAdded(const AccountId& account_id) override; void OnUserSessionUpdated(const AccountId& account_id) override; private: