| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 const std::string& chrome_client_secret); | 124 const std::string& chrome_client_secret); |
| 125 | 125 |
| 126 // Changes browser locale (selects best suitable locale from different | 126 // Changes browser locale (selects best suitable locale from different |
| 127 // user settings). Returns true if callback will be called. | 127 // user settings). Returns true if callback will be called. |
| 128 // Returns true if callback will be called. | 128 // Returns true if callback will be called. |
| 129 bool RespectLocalePreference( | 129 bool RespectLocalePreference( |
| 130 Profile* profile, | 130 Profile* profile, |
| 131 const User* user, | 131 const User* user, |
| 132 scoped_ptr<locale_util::SwitchLanguageCallback> callback) const; | 132 scoped_ptr<locale_util::SwitchLanguageCallback> callback) const; |
| 133 | 133 |
| 134 void AddSessionStateObserver(UserSessionStateObserver* observer); | 134 void AddSessionStateObserver(chromeos::UserSessionStateObserver* observer); |
| 135 void RemoveSessionStateObserver(UserSessionStateObserver* observer); | 135 void RemoveSessionStateObserver(chromeos::UserSessionStateObserver* observer); |
| 136 | 136 |
| 137 private: | 137 private: |
| 138 friend struct DefaultSingletonTraits<UserSessionManager>; | 138 friend struct DefaultSingletonTraits<UserSessionManager>; |
| 139 | 139 |
| 140 typedef std::set<std::string> SigninSessionRestoreStateSet; | 140 typedef std::set<std::string> SigninSessionRestoreStateSet; |
| 141 | 141 |
| 142 UserSessionManager(); | 142 UserSessionManager(); |
| 143 virtual ~UserSessionManager(); | 143 virtual ~UserSessionManager(); |
| 144 | 144 |
| 145 // OAuth2LoginManager::Observer overrides: | 145 // OAuth2LoginManager::Observer overrides: |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 // Active user session restoration related members. | 229 // Active user session restoration related members. |
| 230 | 230 |
| 231 // True is user sessions has been restored after crash. | 231 // True is user sessions has been restored after crash. |
| 232 // On a normal boot then login into user sessions this will be false. | 232 // On a normal boot then login into user sessions this will be false. |
| 233 bool user_sessions_restored_; | 233 bool user_sessions_restored_; |
| 234 | 234 |
| 235 // User sessions that have to be restored after browser crash. | 235 // User sessions that have to be restored after browser crash. |
| 236 // [user_id] > [user_id_hash] | 236 // [user_id] > [user_id_hash] |
| 237 SessionManagerClient::ActiveSessionsMap pending_user_sessions_; | 237 SessionManagerClient::ActiveSessionsMap pending_user_sessions_; |
| 238 | 238 |
| 239 ObserverList<UserSessionStateObserver> session_state_observer_list_; | 239 ObserverList<chromeos::UserSessionStateObserver> session_state_observer_list_; |
| 240 | 240 |
| 241 // OAuth2 session related members. | 241 // OAuth2 session related members. |
| 242 | 242 |
| 243 // True if we should restart chrome right after session restore. | 243 // True if we should restart chrome right after session restore. |
| 244 bool exit_after_session_restore_; | 244 bool exit_after_session_restore_; |
| 245 | 245 |
| 246 // Sesion restore strategy. | 246 // Sesion restore strategy. |
| 247 OAuth2LoginManager::SessionRestoreStrategy session_restore_strategy_; | 247 OAuth2LoginManager::SessionRestoreStrategy session_restore_strategy_; |
| 248 | 248 |
| 249 // OAuth2 refresh token for session restore. | 249 // OAuth2 refresh token for session restore. |
| 250 std::string oauth2_refresh_token_; | 250 std::string oauth2_refresh_token_; |
| 251 | 251 |
| 252 // Set of user_id for those users that we should restore authentication | 252 // Set of user_id for those users that we should restore authentication |
| 253 // session when notified about online state change. | 253 // session when notified about online state change. |
| 254 SigninSessionRestoreStateSet pending_signin_restore_sessions_; | 254 SigninSessionRestoreStateSet pending_signin_restore_sessions_; |
| 255 | 255 |
| 256 // Kiosk mode related members. | 256 // Kiosk mode related members. |
| 257 // Chrome oauth client id and secret - override values for kiosk mode. | 257 // Chrome oauth client id and secret - override values for kiosk mode. |
| 258 std::string chrome_client_id_; | 258 std::string chrome_client_id_; |
| 259 std::string chrome_client_secret_; | 259 std::string chrome_client_secret_; |
| 260 | 260 |
| 261 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); | 261 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 } // namespace chromeos | 264 } // namespace chromeos |
| 265 | 265 |
| 266 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ | 266 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ |
| OLD | NEW |