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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 virtual bool IsCurrentUserNonCryptohomeDataEphemeral() const OVERRIDE; | 83 virtual bool IsCurrentUserNonCryptohomeDataEphemeral() const OVERRIDE; |
84 virtual bool CanCurrentUserLock() const OVERRIDE; | 84 virtual bool CanCurrentUserLock() const OVERRIDE; |
85 virtual bool IsUserLoggedIn() const OVERRIDE; | 85 virtual bool IsUserLoggedIn() const OVERRIDE; |
86 virtual bool IsLoggedInAsRegularUser() const OVERRIDE; | 86 virtual bool IsLoggedInAsRegularUser() const OVERRIDE; |
87 virtual bool IsLoggedInAsDemoUser() const OVERRIDE; | 87 virtual bool IsLoggedInAsDemoUser() const OVERRIDE; |
88 virtual bool IsLoggedInAsPublicAccount() const OVERRIDE; | 88 virtual bool IsLoggedInAsPublicAccount() const OVERRIDE; |
89 virtual bool IsLoggedInAsGuest() const OVERRIDE; | 89 virtual bool IsLoggedInAsGuest() const OVERRIDE; |
90 virtual bool IsLoggedInAsLocallyManagedUser() const OVERRIDE; | 90 virtual bool IsLoggedInAsLocallyManagedUser() const OVERRIDE; |
91 virtual bool IsLoggedInAsStub() const OVERRIDE; | 91 virtual bool IsLoggedInAsStub() const OVERRIDE; |
92 virtual bool IsSessionStarted() const OVERRIDE; | 92 virtual bool IsSessionStarted() const OVERRIDE; |
| 93 virtual MergeSessionState GetMergeSessionState() const OVERRIDE; |
| 94 virtual void SetMergeSessionState(MergeSessionState status) OVERRIDE; |
93 virtual bool HasBrowserRestarted() const OVERRIDE; | 95 virtual bool HasBrowserRestarted() const OVERRIDE; |
94 virtual bool IsUserNonCryptohomeDataEphemeral( | 96 virtual bool IsUserNonCryptohomeDataEphemeral( |
95 const std::string& email) const OVERRIDE; | 97 const std::string& email) const OVERRIDE; |
96 virtual void AddObserver(UserManager::Observer* obs) OVERRIDE; | 98 virtual void AddObserver(UserManager::Observer* obs) OVERRIDE; |
97 virtual void RemoveObserver(UserManager::Observer* obs) OVERRIDE; | 99 virtual void RemoveObserver(UserManager::Observer* obs) OVERRIDE; |
98 virtual void NotifyLocalStateChanged() OVERRIDE; | 100 virtual void NotifyLocalStateChanged() OVERRIDE; |
99 | 101 |
100 // content::NotificationObserver implementation. | 102 // content::NotificationObserver implementation. |
101 virtual void Observe(int type, | 103 virtual void Observe(int type, |
102 const content::NotificationSource& source, | 104 const content::NotificationSource& source, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // updated list of public accounts is received from policy. | 166 // updated list of public accounts is received from policy. |
165 bool UpdateAndCleanUpPublicAccounts(const base::ListValue& public_accounts); | 167 bool UpdateAndCleanUpPublicAccounts(const base::ListValue& public_accounts); |
166 | 168 |
167 // Updates the display name for public account |username| from policy settings | 169 // Updates the display name for public account |username| from policy settings |
168 // associated with that username. | 170 // associated with that username. |
169 void UpdatePublicAccountDisplayName(const std::string& username); | 171 void UpdatePublicAccountDisplayName(const std::string& username); |
170 | 172 |
171 // Notifies the UI about a change to the user list. | 173 // Notifies the UI about a change to the user list. |
172 void NotifyUserListChanged(); | 174 void NotifyUserListChanged(); |
173 | 175 |
| 176 // Notifies observers that merge session state had changed. |
| 177 void NotifyMergeSessionStateChanged(); |
| 178 |
174 // Interface to the signed settings store. | 179 // Interface to the signed settings store. |
175 CrosSettings* cros_settings_; | 180 CrosSettings* cros_settings_; |
176 | 181 |
177 // Interface to device-local account definitions and associated policy. | 182 // Interface to device-local account definitions and associated policy. |
178 policy::DeviceLocalAccountPolicyService* device_local_account_policy_service_; | 183 policy::DeviceLocalAccountPolicyService* device_local_account_policy_service_; |
179 | 184 |
180 // True if users have been loaded from prefs already. | 185 // True if users have been loaded from prefs already. |
181 bool users_loaded_; | 186 bool users_loaded_; |
182 | 187 |
183 // List of all known users. User instances are owned by |this|. Regular users | 188 // List of all known users. User instances are owned by |this|. Regular users |
(...skipping 23 matching lines...) Expand all Loading... |
207 // such users by not adding them to the persistent user list, not downloading | 212 // such users by not adding them to the persistent user list, not downloading |
208 // their custom avatars and mounting their cryptohomes using tmpfs. Defaults | 213 // their custom avatars and mounting their cryptohomes using tmpfs. Defaults |
209 // to |false|. | 214 // to |false|. |
210 bool is_current_user_ephemeral_regular_user_; | 215 bool is_current_user_ephemeral_regular_user_; |
211 | 216 |
212 // Cached flag indicating whether the ephemeral user policy is enabled. | 217 // Cached flag indicating whether the ephemeral user policy is enabled. |
213 // Defaults to |false| if the value has not been read from trusted device | 218 // Defaults to |false| if the value has not been read from trusted device |
214 // policy yet. | 219 // policy yet. |
215 bool ephemeral_users_enabled_; | 220 bool ephemeral_users_enabled_; |
216 | 221 |
217 // True if user pod row is showed at login screen. | 222 // Merge session state (cookie restore process state). |
218 bool show_users_; | 223 MergeSessionState merge_session_state_; |
219 | 224 |
220 // Cached name of device owner. Defaults to empty string if the value has not | 225 // Cached name of device owner. Defaults to empty string if the value has not |
221 // been read from trusted device policy yet. | 226 // been read from trusted device policy yet. |
222 std::string owner_email_; | 227 std::string owner_email_; |
223 | 228 |
224 content::NotificationRegistrar registrar_; | 229 content::NotificationRegistrar registrar_; |
225 | 230 |
226 // Profile sync service which is observed to take actions after sync | 231 // Profile sync service which is observed to take actions after sync |
227 // errors appear. NOTE: there is no guarantee that it is the current sync | 232 // errors appear. NOTE: there is no guarantee that it is the current sync |
228 // service, so do NOT use it outside |OnStateChanged| method. | 233 // service, so do NOT use it outside |OnStateChanged| method. |
229 ProfileSyncService* observed_sync_service_; | 234 ProfileSyncService* observed_sync_service_; |
230 | 235 |
231 ObserverList<UserManager::Observer> observer_list_; | 236 ObserverList<UserManager::Observer> observer_list_; |
232 | 237 |
233 // User avatar manager. | 238 // User avatar manager. |
234 scoped_ptr<UserImageManagerImpl> user_image_manager_; | 239 scoped_ptr<UserImageManagerImpl> user_image_manager_; |
235 | 240 |
236 // Session length limiter. | 241 // Session length limiter. |
237 scoped_ptr<SessionLengthLimiter> session_length_limiter_; | 242 scoped_ptr<SessionLengthLimiter> session_length_limiter_; |
238 | 243 |
239 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); | 244 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); |
240 }; | 245 }; |
241 | 246 |
242 } // namespace chromeos | 247 } // namespace chromeos |
243 | 248 |
244 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ | 249 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ |
OLD | NEW |