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

Unified Diff: ash/system/chromeos/supervised/tray_supervised_user.cc

Issue 575653002: Revert of ash: Add checks for supervised users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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(
« no previous file with comments | « ash/system/chromeos/supervised/tray_supervised_user.h ('k') | ash/system/tray/default_system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698