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

Unified Diff: ash/session_state_delegate_stub.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/session_state_delegate_stub.cc
diff --git a/ash/session_state_delegate_stub.cc b/ash/session_state_delegate_stub.cc
index dcbd346dfd478123008ebb3f243995d8b1be8c96..149f92105b570ea6d04da71c41c20432c47aaa42 100644
--- a/ash/session_state_delegate_stub.cc
+++ b/ash/session_state_delegate_stub.cc
@@ -69,6 +69,15 @@ bool SessionStateDelegateStub::IsUserSessionBlocked() const {
return !IsActiveUserSessionStarted() || IsScreenLocked();
}
+SessionStateDelegate::SessionState SessionStateDelegateStub::GetSessionState()
+ const {
+ if (IsScreenLocked())
+ return STATE_LOCK;
+
+ // Assuming that if session is not active we're at login.
Daniel Erat 2014/04/10 16:30:32 nit: s/Assuming/Assume/
Nikita (slow) 2014/04/10 17:22:51 Done.
+ return IsActiveUserSessionStarted() ? STATE_SESSION : STATE_LOGIN_PRIMARY;
+}
+
const base::string16 SessionStateDelegateStub::GetUserDisplayName(
MultiProfileIndex index) const {
return base::UTF8ToUTF16("stub-user");

Powered by Google App Engine
This is Rietveld 408576698