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