diff options
Diffstat (limited to 'ash/test')
-rw-r--r-- | ash/test/test_session_state_delegate.cc | 10 | ||||
-rw-r--r-- | ash/test/test_session_state_delegate.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/ash/test/test_session_state_delegate.cc b/ash/test/test_session_state_delegate.cc index c4f1ea5..f7efe1d 100644 --- a/ash/test/test_session_state_delegate.cc +++ b/ash/test/test_session_state_delegate.cc @@ -91,6 +91,16 @@ bool TestSessionStateDelegate::IsUserSessionBlocked() const { user_adding_screen_running_; } +SessionStateDelegate::SessionState TestSessionStateDelegate::GetSessionState() + const { + if (user_adding_screen_running_) + return SESSION_STATE_LOGIN_SECONDARY; + + // Assuming that if session is not active we're at login. + return IsActiveUserSessionStarted() ? + SESSION_STATE_ACTIVE : SESSION_STATE_LOGIN_PRIMARY; +} + void TestSessionStateDelegate::SetHasActiveUser(bool has_active_user) { has_active_user_ = has_active_user; if (!has_active_user) diff --git a/ash/test/test_session_state_delegate.h b/ash/test/test_session_state_delegate.h index e56771d..cceefa2 100644 --- a/ash/test/test_session_state_delegate.h +++ b/ash/test/test_session_state_delegate.h @@ -35,6 +35,7 @@ class TestSessionStateDelegate : public SessionStateDelegate { virtual void LockScreen() OVERRIDE; virtual void UnlockScreen() OVERRIDE; virtual bool IsUserSessionBlocked() const OVERRIDE; + virtual SessionState GetSessionState() const OVERRIDE; virtual const base::string16 GetUserDisplayName( ash::MultiProfileIndex index) const OVERRIDE; virtual const base::string16 GetUserGivenName( |