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