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

Unified Diff: ash/test/test_session_state_delegate.cc

Issue 231123002: Notify about major session changes events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tests Created 6 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
Index: ash/test/test_session_state_delegate.cc
diff --git a/ash/test/test_session_state_delegate.cc b/ash/test/test_session_state_delegate.cc
index 491408e32aac69d591b5bf9715c9c4dd6f10aed1..52ef00eefc6e580bd64ac96e82769be16e6d36fc 100644
--- a/ash/test/test_session_state_delegate.cc
+++ b/ash/test/test_session_state_delegate.cc
@@ -91,6 +91,18 @@ bool TestSessionStateDelegate::IsUserSessionBlocked() const {
user_adding_screen_running_;
}
+SessionStateDelegate::SessionState TestSessionStateDelegate::GetSessionState()
+ const {
+ if (user_adding_screen_running_)
+ return STATE_LOGIN_SECONDARY;
+
+ if (IsScreenLocked())
+ return STATE_LOCK;
+
+ // Assuming that if session is not active we're at login.
+ return IsActiveUserSessionStarted() ? STATE_SESSION : STATE_LOGIN_PRIMARY;
+}
+
void TestSessionStateDelegate::SetHasActiveUser(bool has_active_user) {
has_active_user_ = has_active_user;
if (!has_active_user)

Powered by Google App Engine
This is Rietveld 408576698