Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1755)

Unified Diff: ash/system/user/tray_user.cc

Issue 2829813002: cros: Move IsUserSupervised and IsUserChild off SystemTrayDelegate (Closed)
Patch Set: review comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/system_tray_delegate.cc ('k') | ash/system/user/user_card_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/user/tray_user.cc
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc
index 47c6e872d58dc739736cd2158431fbfcbc08a87a..c37e57b57f5ac0264c0de172beb3dbc764285d38 100644
--- a/ash/system/user/tray_user.cc
+++ b/ash/system/user/tray_user.cc
@@ -10,7 +10,6 @@
#include "ash/shell_port.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_item_view.h"
#include "ash/system/tray/tray_utils.h"
@@ -112,8 +111,8 @@ void TrayUser::UpdateAfterLoginStatusChange(LoginStatus status) {
return;
bool need_label = false;
bool need_avatar = false;
- SystemTrayDelegate* delegate = Shell::Get()->system_tray_delegate();
- if (delegate->IsUserSupervised())
+ SessionController* session = Shell::Get()->session_controller();
+ if (session->IsUserSupervised())
need_label = true;
switch (status) {
case LoginStatus::LOCKED:
@@ -157,7 +156,7 @@ void TrayUser::UpdateAfterLoginStatusChange(LoginStatus status) {
}
}
- if (delegate->IsUserSupervised()) {
+ if (session->IsUserSupervised()) {
label_->SetText(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SUPERVISED_LABEL));
} else if (status == LoginStatus::GUEST) {
« no previous file with comments | « ash/system/tray/system_tray_delegate.cc ('k') | ash/system/user/user_card_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698