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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 bool NeedsToUpdateEasyUnlockKeys() const; | 153 bool NeedsToUpdateEasyUnlockKeys() const; |
154 | 154 |
155 // Returns true if there are pending Easy unlock key operations and | 155 // Returns true if there are pending Easy unlock key operations and |
156 // |callback| will be invoked when it is done. | 156 // |callback| will be invoked when it is done. |
157 bool CheckEasyUnlockKeyOps(const base::Closure& callback); | 157 bool CheckEasyUnlockKeyOps(const base::Closure& callback); |
158 | 158 |
159 void AddSessionStateObserver(chromeos::UserSessionStateObserver* observer); | 159 void AddSessionStateObserver(chromeos::UserSessionStateObserver* observer); |
160 void RemoveSessionStateObserver(chromeos::UserSessionStateObserver* observer); | 160 void RemoveSessionStateObserver(chromeos::UserSessionStateObserver* observer); |
161 | 161 |
162 virtual void ActiveUserChanged( | 162 virtual void ActiveUserChanged( |
163 const user_manager::User* active_user) OVERRIDE; | 163 const user_manager::User* active_user) override; |
164 | 164 |
165 // Returns default IME state for user session. | 165 // Returns default IME state for user session. |
166 scoped_refptr<input_method::InputMethodManager::State> GetDefaultIMEState( | 166 scoped_refptr<input_method::InputMethodManager::State> GetDefaultIMEState( |
167 Profile* profile); | 167 Profile* profile); |
168 | 168 |
169 // Note this could return NULL if not enabled. | 169 // Note this could return NULL if not enabled. |
170 EasyUnlockKeyManager* GetEasyUnlockKeyManager(); | 170 EasyUnlockKeyManager* GetEasyUnlockKeyManager(); |
171 | 171 |
172 private: | 172 private: |
173 friend struct DefaultSingletonTraits<UserSessionManager>; | 173 friend struct DefaultSingletonTraits<UserSessionManager>; |
174 | 174 |
175 typedef std::set<std::string> SigninSessionRestoreStateSet; | 175 typedef std::set<std::string> SigninSessionRestoreStateSet; |
176 | 176 |
177 UserSessionManager(); | 177 UserSessionManager(); |
178 virtual ~UserSessionManager(); | 178 virtual ~UserSessionManager(); |
179 | 179 |
180 // OAuth2LoginManager::Observer overrides: | 180 // OAuth2LoginManager::Observer overrides: |
181 virtual void OnSessionRestoreStateChanged( | 181 virtual void OnSessionRestoreStateChanged( |
182 Profile* user_profile, | 182 Profile* user_profile, |
183 OAuth2LoginManager::SessionRestoreState state) OVERRIDE; | 183 OAuth2LoginManager::SessionRestoreState state) override; |
184 virtual void OnNewRefreshTokenAvaiable(Profile* user_profile) OVERRIDE; | 184 virtual void OnNewRefreshTokenAvaiable(Profile* user_profile) override; |
185 | 185 |
186 // net::NetworkChangeNotifier::ConnectionTypeObserver overrides: | 186 // net::NetworkChangeNotifier::ConnectionTypeObserver overrides: |
187 virtual void OnConnectionTypeChanged( | 187 virtual void OnConnectionTypeChanged( |
188 net::NetworkChangeNotifier::ConnectionType type) OVERRIDE; | 188 net::NetworkChangeNotifier::ConnectionType type) override; |
189 | 189 |
190 // UserSessionManagerDelegate overrides: | 190 // UserSessionManagerDelegate overrides: |
191 // Used when restoring user sessions after crash. | 191 // Used when restoring user sessions after crash. |
192 virtual void OnProfilePrepared(Profile* profile) OVERRIDE; | 192 virtual void OnProfilePrepared(Profile* profile) override; |
193 | 193 |
194 void CreateUserSession(const UserContext& user_context, | 194 void CreateUserSession(const UserContext& user_context, |
195 bool has_auth_cookies); | 195 bool has_auth_cookies); |
196 void PreStartSession(); | 196 void PreStartSession(); |
197 void StartCrosSession(); | 197 void StartCrosSession(); |
198 void NotifyUserLoggedIn(); | 198 void NotifyUserLoggedIn(); |
199 void PrepareProfile(); | 199 void PrepareProfile(); |
200 | 200 |
201 // Callback for asynchronous profile creation. | 201 // Callback for asynchronous profile creation. |
202 void OnProfileCreated(const UserContext& user_context, | 202 void OnProfileCreated(const UserContext& user_context, |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 scoped_ptr<EasyUnlockKeyManager> easy_unlock_key_manager_; | 311 scoped_ptr<EasyUnlockKeyManager> easy_unlock_key_manager_; |
312 bool running_easy_unlock_key_ops_; | 312 bool running_easy_unlock_key_ops_; |
313 base::Closure easy_unlock_key_ops_finished_callback_; | 313 base::Closure easy_unlock_key_ops_finished_callback_; |
314 | 314 |
315 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); | 315 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); |
316 }; | 316 }; |
317 | 317 |
318 } // namespace chromeos | 318 } // namespace chromeos |
319 | 319 |
320 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ | 320 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ |
OLD | NEW |