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

Unified Diff: ash/common/system/web_notification/web_notification_tray.cc

Issue 2120033002: Hide web notification tray when LoginStatus is locked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/web_notification/web_notification_tray.cc
diff --git a/ash/common/system/web_notification/web_notification_tray.cc b/ash/common/system/web_notification/web_notification_tray.cc
index 9109408945a3b330263d8ba4c148d3f5f992b8e2..a0afe3397eaaa07a30ba9558ec24a1d847752d84 100644
--- a/ash/common/system/web_notification/web_notification_tray.cc
+++ b/ash/common/system/web_notification/web_notification_tray.cc
@@ -515,9 +515,9 @@ message_center::MessageCenter* WebNotificationTray::message_center() const {
bool WebNotificationTray::IsLoggedIn() const {
WmShell* shell = WmShell::Get();
- // TODO(jamescook): Should this also check LoginState::LOCKED?
- return shell->system_tray_delegate()->GetUserLoginStatus() !=
- LoginStatus::NOT_LOGGED_IN &&
+ LoginStatus status = shell->system_tray_delegate()->GetUserLoginStatus();
+ return status != LoginStatus::NOT_LOGGED_IN &&
+ status != LoginStatus::LOCKED &&
!shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698