| OLD | NEW |
| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // and notifies observers. | 91 // and notifies observers. |
| 92 void RestoreActiveSessions(); | 92 void RestoreActiveSessions(); |
| 93 | 93 |
| 94 // Returns true iff browser has been restarted after crash and UserManager | 94 // Returns true iff browser has been restarted after crash and UserManager |
| 95 // finished restoring user sessions. | 95 // finished restoring user sessions. |
| 96 bool UserSessionsRestored() const; | 96 bool UserSessionsRestored() const; |
| 97 | 97 |
| 98 // Initialize RLZ. | 98 // Initialize RLZ. |
| 99 void InitRlz(Profile* profile); | 99 void InitRlz(Profile* profile); |
| 100 | 100 |
| 101 // Returns true when the browser has crashed and restarted during the current | |
| 102 // user's session. | |
| 103 bool HasBrowserRestarted() const; | |
| 104 | |
| 105 // TODO(nkostylev): Drop these methods once LoginUtilsImpl::AttemptRestart() | 101 // TODO(nkostylev): Drop these methods once LoginUtilsImpl::AttemptRestart() |
| 106 // is migrated. | 102 // is migrated. |
| 107 OAuth2LoginManager::SessionRestoreStrategy GetSigninSessionRestoreStrategy(); | 103 OAuth2LoginManager::SessionRestoreStrategy GetSigninSessionRestoreStrategy(); |
| 108 bool exit_after_session_restore() { return exit_after_session_restore_; } | 104 bool exit_after_session_restore() { return exit_after_session_restore_; } |
| 109 void set_exit_after_session_restore(bool value) { | 105 void set_exit_after_session_restore(bool value) { |
| 110 exit_after_session_restore_ = value; | 106 exit_after_session_restore_ = value; |
| 111 } | 107 } |
| 112 | 108 |
| 113 // Invoked when the user is logging in for the first time, or is logging in as | 109 // Invoked when the user is logging in for the first time, or is logging in as |
| 114 // a guest user. | 110 // a guest user. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 void RestoreAuthSessionImpl(Profile* profile, | 191 void RestoreAuthSessionImpl(Profile* profile, |
| 196 bool restore_from_auth_cookies); | 192 bool restore_from_auth_cookies); |
| 197 | 193 |
| 198 // Initializes RLZ. If |disabled| is true, RLZ pings are disabled. | 194 // Initializes RLZ. If |disabled| is true, RLZ pings are disabled. |
| 199 void InitRlzImpl(Profile* profile, bool disabled); | 195 void InitRlzImpl(Profile* profile, bool disabled); |
| 200 | 196 |
| 201 // Get the NSS cert database for the primary user and start certificate | 197 // Get the NSS cert database for the primary user and start certificate |
| 202 // loader with it. | 198 // loader with it. |
| 203 void InitializeCertsForPrimaryUser(Profile* profile); | 199 void InitializeCertsForPrimaryUser(Profile* profile); |
| 204 | 200 |
| 201 // Starts loading CRL set for primary user. |
| 202 void InitializeCRLSetFetcherForPrimaryUser(const user_manager::User* user); |
| 203 |
| 205 // Callback to process RetrieveActiveSessions() request results. | 204 // Callback to process RetrieveActiveSessions() request results. |
| 206 void OnRestoreActiveSessions( | 205 void OnRestoreActiveSessions( |
| 207 const SessionManagerClient::ActiveSessionsMap& sessions, | 206 const SessionManagerClient::ActiveSessionsMap& sessions, |
| 208 bool success); | 207 bool success); |
| 209 | 208 |
| 210 // Called by OnRestoreActiveSessions() when there're user sessions in | 209 // Called by OnRestoreActiveSessions() when there're user sessions in |
| 211 // |pending_user_sessions_| that has to be restored one by one. | 210 // |pending_user_sessions_| that has to be restored one by one. |
| 212 // Also called after first user session from that list is restored and so on. | 211 // Also called after first user session from that list is restored and so on. |
| 213 // Process continues till |pending_user_sessions_| map is not empty. | 212 // Process continues till |pending_user_sessions_| map is not empty. |
| 214 void RestorePendingUserSessions(); | 213 void RestorePendingUserSessions(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 // Chrome oauth client id and secret - override values for kiosk mode. | 256 // Chrome oauth client id and secret - override values for kiosk mode. |
| 258 std::string chrome_client_id_; | 257 std::string chrome_client_id_; |
| 259 std::string chrome_client_secret_; | 258 std::string chrome_client_secret_; |
| 260 | 259 |
| 261 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); | 260 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); |
| 262 }; | 261 }; |
| 263 | 262 |
| 264 } // namespace chromeos | 263 } // namespace chromeos |
| 265 | 264 |
| 266 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ | 265 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ |
| OLD | NEW |