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

Unified Diff: components/session_manager/core/session_manager.h

Issue 417623002: user_manager component: Add UserManagerBase class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: check for LocalState, update test - make sure that policies are initialized on UserManager creation Created 6 years, 5 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 | « components/session_manager/DEPS ('k') | components/session_manager/core/session_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/session_manager/core/session_manager.h
diff --git a/components/session_manager/core/session_manager.h b/components/session_manager/core/session_manager.h
index e728e7fc93ce918b8bef2fc64f72908438a1252c..d2e97043d4a5f9f59a01d8beb5029641b200269f 100644
--- a/components/session_manager/core/session_manager.h
+++ b/components/session_manager/core/session_manager.h
@@ -45,6 +45,10 @@ class SESSION_EXPORT SessionManager {
SessionManager();
virtual ~SessionManager();
+ // Returns current SessionManager instance and NULL if it hasn't been
+ // initialized yet.
+ static SessionManager* Get();
+
SessionState session_state() const { return session_state_; }
virtual void SetSessionState(SessionState state);
@@ -52,11 +56,25 @@ class SESSION_EXPORT SessionManager {
// current session type / state.
void Start();
+ // Returns true when the browser has crashed and restarted during the current
+ // user's session.
+ static bool HasBrowserRestarted();
+
protected:
// Initializes SessionManager with delegate.
void Initialize(SessionManagerDelegate* delegate);
+ // Sets SessionManager instance.
+ static void SetInstance(SessionManager* session_manager);
+
private:
+ // Pointer to the existing SessionManager instance (if any).
+ // Set in ctor, reset in dtor. Not owned since specific implementation of
+ // SessionManager should decide on its own appropriate owner of SessionManager
+ // instance. For src/chrome implementation such place is
+ // g_browser_process->platform_part().
+ static SessionManager* instance;
+
SessionState session_state_;
scoped_ptr<SessionManagerDelegate> delegate_;
« no previous file with comments | « components/session_manager/DEPS ('k') | components/session_manager/core/session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698