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

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.h

Issue 594163002: Restore last used user session after crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: special case in ChromeUserManagerImpl Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/session/user_session_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Restores authentication session after crash. 96 // Restores authentication session after crash.
97 void RestoreAuthenticationSession(Profile* profile); 97 void RestoreAuthenticationSession(Profile* profile);
98 98
99 // Usually is called when Chrome is restarted after a crash and there's an 99 // Usually is called when Chrome is restarted after a crash and there's an
100 // active session. First user (one that is passed with --login-user) Chrome 100 // active session. First user (one that is passed with --login-user) Chrome
101 // session has been already restored at this point. This method asks session 101 // session has been already restored at this point. This method asks session
102 // manager for all active user sessions, marks them as logged in 102 // manager for all active user sessions, marks them as logged in
103 // and notifies observers. 103 // and notifies observers.
104 void RestoreActiveSessions(); 104 void RestoreActiveSessions();
105 105
106 // Returns true iff browser has been restarted after crash and UserManager 106 // Returns true iff browser has been restarted after crash and
107 // finished restoring user sessions. 107 // UserSessionManager finished restoring user sessions.
108 bool UserSessionsRestored() const; 108 bool UserSessionsRestored() const;
109 109
110 // Returns true iff browser has been restarted after crash and
111 // user sessions restoration is in progress.
112 bool UserSessionsRestoreInProgress() const;
113
110 // Initialize RLZ. 114 // Initialize RLZ.
111 void InitRlz(Profile* profile); 115 void InitRlz(Profile* profile);
112 116
113 // Get the NSS cert database for the user represented with |profile| 117 // Get the NSS cert database for the user represented with |profile|
114 // and start certificate loader with it. 118 // and start certificate loader with it.
115 void InitializeCerts(Profile* profile); 119 void InitializeCerts(Profile* profile);
116 120
117 // TODO(nkostylev): Drop these methods once LoginUtilsImpl::AttemptRestart() 121 // TODO(nkostylev): Drop these methods once LoginUtilsImpl::AttemptRestart()
118 // is migrated. 122 // is migrated.
119 OAuth2LoginManager::SessionRestoreStrategy GetSigninSessionRestoreStrategy(); 123 OAuth2LoginManager::SessionRestoreStrategy GetSigninSessionRestoreStrategy();
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // Authentication/user context. 253 // Authentication/user context.
250 UserContext user_context_; 254 UserContext user_context_;
251 scoped_refptr<Authenticator> authenticator_; 255 scoped_refptr<Authenticator> authenticator_;
252 256
253 // True if the authentication context's cookie jar contains authentication 257 // True if the authentication context's cookie jar contains authentication
254 // cookies from the authentication extension login flow. 258 // cookies from the authentication extension login flow.
255 bool has_auth_cookies_; 259 bool has_auth_cookies_;
256 260
257 // Active user session restoration related members. 261 // Active user session restoration related members.
258 262
259 // True is user sessions has been restored after crash. 263 // True if user sessions has been restored after crash.
260 // On a normal boot then login into user sessions this will be false. 264 // On a normal boot then login into user sessions this will be false.
261 bool user_sessions_restored_; 265 bool user_sessions_restored_;
262 266
267 // True if user sessions restoration after crash is in progress.
268 bool user_sessions_restore_in_progress_;
269
263 // User sessions that have to be restored after browser crash. 270 // User sessions that have to be restored after browser crash.
264 // [user_id] > [user_id_hash] 271 // [user_id] > [user_id_hash]
265 SessionManagerClient::ActiveSessionsMap pending_user_sessions_; 272 SessionManagerClient::ActiveSessionsMap pending_user_sessions_;
266 273
267 ObserverList<chromeos::UserSessionStateObserver> session_state_observer_list_; 274 ObserverList<chromeos::UserSessionStateObserver> session_state_observer_list_;
268 275
269 // OAuth2 session related members. 276 // OAuth2 session related members.
270 277
271 // True if we should restart chrome right after session restore. 278 // True if we should restart chrome right after session restore.
272 bool exit_after_session_restore_; 279 bool exit_after_session_restore_;
(...skipping 19 matching lines...) Expand all
292 299
293 // Manages Easy unlock cryptohome keys. 300 // Manages Easy unlock cryptohome keys.
294 scoped_ptr<EasyUnlockKeyManager> easy_unlock_key_manager_; 301 scoped_ptr<EasyUnlockKeyManager> easy_unlock_key_manager_;
295 302
296 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); 303 DISALLOW_COPY_AND_ASSIGN(UserSessionManager);
297 }; 304 };
298 305
299 } // namespace chromeos 306 } // namespace chromeos
300 307
301 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ 308 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/session/user_session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698