| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 virtual bool CanCurrentUserLock() const OVERRIDE; | 99 virtual bool CanCurrentUserLock() const OVERRIDE; |
| 100 virtual bool IsUserLoggedIn() const OVERRIDE; | 100 virtual bool IsUserLoggedIn() const OVERRIDE; |
| 101 virtual bool IsLoggedInAsRegularUser() const OVERRIDE; | 101 virtual bool IsLoggedInAsRegularUser() const OVERRIDE; |
| 102 virtual bool IsLoggedInAsDemoUser() const OVERRIDE; | 102 virtual bool IsLoggedInAsDemoUser() const OVERRIDE; |
| 103 virtual bool IsLoggedInAsPublicAccount() const OVERRIDE; | 103 virtual bool IsLoggedInAsPublicAccount() const OVERRIDE; |
| 104 virtual bool IsLoggedInAsGuest() const OVERRIDE; | 104 virtual bool IsLoggedInAsGuest() const OVERRIDE; |
| 105 virtual bool IsLoggedInAsLocallyManagedUser() const OVERRIDE; | 105 virtual bool IsLoggedInAsLocallyManagedUser() const OVERRIDE; |
| 106 virtual bool IsLoggedInAsKioskApp() const OVERRIDE; | 106 virtual bool IsLoggedInAsKioskApp() const OVERRIDE; |
| 107 virtual bool IsLoggedInAsStub() const OVERRIDE; | 107 virtual bool IsLoggedInAsStub() const OVERRIDE; |
| 108 virtual bool IsSessionStarted() const OVERRIDE; | 108 virtual bool IsSessionStarted() const OVERRIDE; |
| 109 virtual int64 GetSessionDurationInSeconds() const OVERRIDE; |
| 109 virtual bool UserSessionsRestored() const OVERRIDE; | 110 virtual bool UserSessionsRestored() const OVERRIDE; |
| 110 virtual MergeSessionState GetMergeSessionState() const OVERRIDE; | 111 virtual MergeSessionState GetMergeSessionState() const OVERRIDE; |
| 111 virtual void SetMergeSessionState(MergeSessionState status) OVERRIDE; | 112 virtual void SetMergeSessionState(MergeSessionState status) OVERRIDE; |
| 112 virtual bool HasBrowserRestarted() const OVERRIDE; | 113 virtual bool HasBrowserRestarted() const OVERRIDE; |
| 113 virtual bool IsUserNonCryptohomeDataEphemeral( | 114 virtual bool IsUserNonCryptohomeDataEphemeral( |
| 114 const std::string& email) const OVERRIDE; | 115 const std::string& email) const OVERRIDE; |
| 115 virtual void AddObserver(UserManager::Observer* obs) OVERRIDE; | 116 virtual void AddObserver(UserManager::Observer* obs) OVERRIDE; |
| 116 virtual void RemoveObserver(UserManager::Observer* obs) OVERRIDE; | 117 virtual void RemoveObserver(UserManager::Observer* obs) OVERRIDE; |
| 117 virtual void AddSessionStateObserver( | 118 virtual void AddSessionStateObserver( |
| 118 UserManager::UserSessionStateObserver* obs) OVERRIDE; | 119 UserManager::UserSessionStateObserver* obs) OVERRIDE; |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 | 338 |
| 338 // The logged-in user that is currently active in current session. | 339 // The logged-in user that is currently active in current session. |
| 339 // NULL until a user has logged in, then points to one | 340 // NULL until a user has logged in, then points to one |
| 340 // of the User instances in |users_|, the |guest_user_| instance or an | 341 // of the User instances in |users_|, the |guest_user_| instance or an |
| 341 // ephemeral user instance. | 342 // ephemeral user instance. |
| 342 User* active_user_; | 343 User* active_user_; |
| 343 | 344 |
| 344 // True if SessionStarted() has been called. | 345 // True if SessionStarted() has been called. |
| 345 bool session_started_; | 346 bool session_started_; |
| 346 | 347 |
| 348 // Time of the session start event. |
| 349 base::Time session_start_time_; |
| 350 |
| 347 // True is user sessions has been restored after crash. | 351 // True is user sessions has been restored after crash. |
| 348 // On a normal boot then login into user sessions this will be false. | 352 // On a normal boot then login into user sessions this will be false. |
| 349 bool user_sessions_restored_; | 353 bool user_sessions_restored_; |
| 350 | 354 |
| 351 // Cached flag of whether currently logged-in user is owner or not. | 355 // Cached flag of whether currently logged-in user is owner or not. |
| 352 // May be accessed on different threads, requires locking. | 356 // May be accessed on different threads, requires locking. |
| 353 bool is_current_user_owner_; | 357 bool is_current_user_owner_; |
| 354 mutable base::Lock is_current_user_owner_lock_; | 358 mutable base::Lock is_current_user_owner_lock_; |
| 355 | 359 |
| 356 // Cached flag of whether the currently logged-in user existed before this | 360 // Cached flag of whether the currently logged-in user existed before this |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 | 418 |
| 415 // Time at which this object was created. | 419 // Time at which this object was created. |
| 416 base::TimeTicks manager_creation_time_; | 420 base::TimeTicks manager_creation_time_; |
| 417 | 421 |
| 418 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); | 422 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); |
| 419 }; | 423 }; |
| 420 | 424 |
| 421 } // namespace chromeos | 425 } // namespace chromeos |
| 422 | 426 |
| 423 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ | 427 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ |
| OLD | NEW |