| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_USER_MANAGER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 // policy::DeviceLocalAccountPolicyService::Observer implementation. | 158 // policy::DeviceLocalAccountPolicyService::Observer implementation. |
| 159 virtual void OnPolicyUpdated(const std::string& user_id) OVERRIDE; | 159 virtual void OnPolicyUpdated(const std::string& user_id) OVERRIDE; |
| 160 virtual void OnDeviceLocalAccountsChanged() OVERRIDE; | 160 virtual void OnDeviceLocalAccountsChanged() OVERRIDE; |
| 161 | 161 |
| 162 virtual bool RespectLocalePreference( | 162 virtual bool RespectLocalePreference( |
| 163 Profile* profile, | 163 Profile* profile, |
| 164 const User* user, | 164 const User* user, |
| 165 scoped_ptr<locale_util::SwitchLanguageCallback> callback) const OVERRIDE; | 165 scoped_ptr<locale_util::SwitchLanguageCallback> callback) const OVERRIDE; |
| 166 | 166 |
| 167 // Adds |user| to users list, and adds it to front of LRU list. It is assumed |
| 168 // that there is no user with same id. |
| 169 void AddUserRecord(User* user); |
| 170 |
| 167 void StopPolicyObserverForTesting(); | 171 void StopPolicyObserverForTesting(); |
| 168 | 172 |
| 169 private: | 173 private: |
| 170 friend class SupervisedUserManagerImpl; | 174 friend class SupervisedUserManagerImpl; |
| 171 friend class UserManager; | 175 friend class UserManager; |
| 172 friend class WallpaperManager; | 176 friend class WallpaperManager; |
| 173 friend class UserManagerTest; | 177 friend class UserManagerTest; |
| 174 friend class WallpaperManagerTest; | 178 friend class WallpaperManagerTest; |
| 175 | 179 |
| 176 typedef base::hash_map<std::string, | 180 typedef base::hash_map<std::string, |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 314 |
| 311 // Lazily creates default user flow. | 315 // Lazily creates default user flow. |
| 312 UserFlow* GetDefaultUserFlow() const; | 316 UserFlow* GetDefaultUserFlow() const; |
| 313 | 317 |
| 314 // Update the global LoginState. | 318 // Update the global LoginState. |
| 315 void UpdateLoginState(); | 319 void UpdateLoginState(); |
| 316 | 320 |
| 317 // Insert |user| at the front of the LRU user list. | 321 // Insert |user| at the front of the LRU user list. |
| 318 void SetLRUUser(User* user); | 322 void SetLRUUser(User* user); |
| 319 | 323 |
| 320 // Adds |user| to users list, and adds it to front of LRU list. It is assumed | |
| 321 // that there is no user with same id. | |
| 322 void AddUserRecord(User* user); | |
| 323 | |
| 324 // Callback to process RetrieveActiveSessions() request results. | 324 // Callback to process RetrieveActiveSessions() request results. |
| 325 void OnRestoreActiveSessions( | 325 void OnRestoreActiveSessions( |
| 326 const SessionManagerClient::ActiveSessionsMap& sessions, | 326 const SessionManagerClient::ActiveSessionsMap& sessions, |
| 327 bool success); | 327 bool success); |
| 328 | 328 |
| 329 // Called by OnRestoreActiveSessions() when there're user sessions in | 329 // Called by OnRestoreActiveSessions() when there're user sessions in |
| 330 // |pending_user_sessions_| that has to be restored one by one. | 330 // |pending_user_sessions_| that has to be restored one by one. |
| 331 // Also called after first user session from that list is restored and so on. | 331 // Also called after first user session from that list is restored and so on. |
| 332 // Process continues till |pending_user_sessions_| map is not empty. | 332 // Process continues till |pending_user_sessions_| map is not empty. |
| 333 void RestorePendingUserSessions(); | 333 void RestorePendingUserSessions(); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 // ID of the user just added to the session that needs to be activated | 486 // ID of the user just added to the session that needs to be activated |
| 487 // as soon as user's profile is loaded. | 487 // as soon as user's profile is loaded. |
| 488 std::string pending_user_switch_; | 488 std::string pending_user_switch_; |
| 489 | 489 |
| 490 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); | 490 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); |
| 491 }; | 491 }; |
| 492 | 492 |
| 493 } // namespace chromeos | 493 } // namespace chromeos |
| 494 | 494 |
| 495 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ | 495 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ |
| OLD | NEW |