Chromium Code Reviews| Index: chrome/browser/chromeos/login/user_manager_impl.h |
| diff --git a/chrome/browser/chromeos/login/user_manager_impl.h b/chrome/browser/chromeos/login/user_manager_impl.h |
| index 93e32f07d9192a3941ccfe6cedf1c35cfd43fe95..94363ab1fb74650faebd9928f931f04f8722d88a 100644 |
| --- a/chrome/browser/chromeos/login/user_manager_impl.h |
| +++ b/chrome/browser/chromeos/login/user_manager_impl.h |
| @@ -12,11 +12,13 @@ |
| #include "base/memory/singleton.h" |
| #include "base/observer_list.h" |
| #include "base/synchronization/lock.h" |
| +#include "base/values.h" |
| #include "chrome/browser/api/sync/profile_sync_service_observer.h" |
| #include "chrome/browser/chromeos/login/user.h" |
| #include "chrome/browser/chromeos/login/user_image_manager_impl.h" |
| #include "chrome/browser/chromeos/login/user_manager.h" |
| #include "chrome/browser/chromeos/login/wallpaper_manager.h" |
| +#include "chrome/browser/chromeos/settings/cros_settings.h" |
| #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
| @@ -37,6 +39,7 @@ class UserManagerImpl : public UserManager, |
| virtual ~UserManagerImpl(); |
| // UserManager implementation: |
| + virtual void Shutdown() OVERRIDE; |
| virtual UserImageManager* GetUserImageManager() OVERRIDE; |
| virtual const UserList& GetUsers() const OVERRIDE; |
| virtual void UserLoggedIn(const std::string& email, |
| @@ -68,6 +71,7 @@ class UserManagerImpl : public UserManager, |
| virtual bool IsCurrentUserEphemeral() const OVERRIDE; |
| virtual bool CanCurrentUserLock() const OVERRIDE; |
| virtual bool IsUserLoggedIn() const OVERRIDE; |
| + virtual bool IsLoggedInAsRegularUser() const OVERRIDE; |
| virtual bool IsLoggedInAsDemoUser() const OVERRIDE; |
| virtual bool IsLoggedInAsPublicAccount() const OVERRIDE; |
| virtual bool IsLoggedInAsGuest() const OVERRIDE; |
| @@ -125,13 +129,30 @@ class UserManagerImpl : public UserManager, |
| // Triggers an asynchronous ownership check. |
| void CheckOwnership(); |
| - // Removes the user from the persistent list only. Also removes the user's |
| - // picture. |
| - void RemoveUserFromListInternal(const std::string& email); |
| + // Removes data stored or cached outside the user's cryptohome (wallpaper, |
| + // avatar, OAuth token status, display name, display email). |
| + void RemoveNonCryptohomeData(const std::string& email); |
| - // List of all known users. User instances are owned by |this| and deleted |
| - // when users are removed by |RemoveUserFromListInternal|. |
| - mutable UserList users_; |
| + // Removes a regular user from the user list. Returns the user if found or |
| + // NULL otherwise. Also removes the user from the persistent regular user |
| + // list. |
| + User *RemoveRegularUserFromList(const std::string& email); |
| + |
| + // Replaces the list of public accounts with |public_accounts|. Ensures that |
|
Nikita (slow)
2012/11/30 14:20:02
Could you please add more comments that describe i
bartfab (slow)
2012/11/30 14:46:27
Done.
|
| + // data belonging to accounts no longer on the list is removed. Returns |true| |
| + // if the list has changed. |
| + bool UpdateAndCleanUpPublicAccounts(const base::ListValue& public_accounts); |
| + |
| + // Interface to the signed settings store. |
| + CrosSettings* cros_settings_; |
| + |
| + // True if users have been loaded from prefs already. |
| + bool users_loaded_; |
| + |
| + // List of all known users. User instances are owned by |this|. Regular users |
| + // are removed by |RemoveUserFromList|, public accounts by |
| + // |UpdateAndCleanUpPublicAccounts|. |
| + UserList users_; |
| // The logged-in user. NULL until a user has logged in, then points to one |
| // of the User instances in |users_|, the |guest_user_| instance or an |
| @@ -176,6 +197,7 @@ class UserManagerImpl : public UserManager, |
| ObserverList<UserManager::Observer> observer_list_; |
| + // User avatar manager. |
| scoped_ptr<UserImageManagerImpl> user_image_manager_; |
| DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); |