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

Unified Diff: chromeos/login/login_state.h

Issue 24072006: Return correct window when user is logged in but before session is started. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit test compile error Created 7 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: chromeos/login/login_state.h
diff --git a/chromeos/login/login_state.h b/chromeos/login/login_state.h
index 68966f57ec721b875b2f0c0ad40f385b1924753a..7aae3efc9d8b5531532e5634893b83112a47b146 100644
--- a/chromeos/login/login_state.h
+++ b/chromeos/login/login_state.h
@@ -34,6 +34,7 @@ class CHROMEOS_EXPORT LoginState {
class Observer {
public:
// Called when either the login state or the logged in user type changes.
+ // TODO(tengs): Should we notify the observer when the session is started?
virtual void LoggedInStateChanged(LoggedInState state) = 0;
protected:
@@ -53,6 +54,9 @@ class CHROMEOS_EXPORT LoginState {
// Set the logged in state and user type.
void SetLoggedInState(LoggedInState state, LoggedInUserType type);
+ // Set whether the browser session is started.
+ void SetSessionStarted(bool session_started);
+
// Get the logged in state / user type.
LoggedInState GetLoggedInState() const;
LoggedInUserType GetLoggedInUserType() const;
@@ -70,6 +74,11 @@ class CHROMEOS_EXPORT LoginState {
// (i.e., non public nor locally managed account).
bool IsUserGaiaAuthenticated() const;
+ // Returns true if the browser session is started. User login occurs before
+ // the session starts. Some procedures can take place during this iterval,
+ // so we need to provide this distinction.
+ bool IsSessionStarted() const;
+
private:
LoginState();
virtual ~LoginState();
@@ -78,6 +87,7 @@ class CHROMEOS_EXPORT LoginState {
LoggedInState logged_in_state_;
LoggedInUserType logged_in_user_type_;
+ bool session_started_;
ObserverList<Observer> observer_list_;
DISALLOW_COPY_AND_ASSIGN(LoginState);

Powered by Google App Engine
This is Rietveld 408576698