| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 const std::string& username, | 56 const std::string& username, |
| 57 User::OAuthTokenStatus oauth_token_status) OVERRIDE; | 57 User::OAuthTokenStatus oauth_token_status) OVERRIDE; |
| 58 virtual void SaveUserDisplayName(const std::string& username, | 58 virtual void SaveUserDisplayName(const std::string& username, |
| 59 const string16& display_name) OVERRIDE; | 59 const string16& display_name) OVERRIDE; |
| 60 virtual string16 GetUserDisplayName( | 60 virtual string16 GetUserDisplayName( |
| 61 const std::string& username) const OVERRIDE; | 61 const std::string& username) const OVERRIDE; |
| 62 virtual void SaveUserDisplayEmail(const std::string& username, | 62 virtual void SaveUserDisplayEmail(const std::string& username, |
| 63 const std::string& display_email) OVERRIDE; | 63 const std::string& display_email) OVERRIDE; |
| 64 virtual std::string GetUserDisplayEmail( | 64 virtual std::string GetUserDisplayEmail( |
| 65 const std::string& username) const OVERRIDE; | 65 const std::string& username) const OVERRIDE; |
| 66 virtual void SaveLoggedInUserWallpaperProperties(User::WallpaperType type, | |
| 67 int index) OVERRIDE; | |
| 68 virtual void SetLoggedInUserCustomWallpaperLayout( | |
| 69 ash::WallpaperLayout layout) OVERRIDE; | |
| 70 virtual bool IsCurrentUserOwner() const OVERRIDE; | 66 virtual bool IsCurrentUserOwner() const OVERRIDE; |
| 71 virtual bool IsCurrentUserNew() const OVERRIDE; | 67 virtual bool IsCurrentUserNew() const OVERRIDE; |
| 72 virtual bool IsCurrentUserEphemeral() const OVERRIDE; | 68 virtual bool IsCurrentUserEphemeral() const OVERRIDE; |
| 73 virtual bool IsUserLoggedIn() const OVERRIDE; | 69 virtual bool IsUserLoggedIn() const OVERRIDE; |
| 74 virtual bool IsLoggedInAsDemoUser() const OVERRIDE; | 70 virtual bool IsLoggedInAsDemoUser() const OVERRIDE; |
| 75 virtual bool IsLoggedInAsPublicAccount() const OVERRIDE; | 71 virtual bool IsLoggedInAsPublicAccount() const OVERRIDE; |
| 76 virtual bool IsLoggedInAsGuest() const OVERRIDE; | 72 virtual bool IsLoggedInAsGuest() const OVERRIDE; |
| 77 virtual bool IsLoggedInAsStub() const OVERRIDE; | 73 virtual bool IsLoggedInAsStub() const OVERRIDE; |
| 78 virtual bool IsSessionStarted() const OVERRIDE; | 74 virtual bool IsSessionStarted() const OVERRIDE; |
| 79 virtual bool IsEphemeralUser(const std::string& email) const OVERRIDE; | 75 virtual bool IsEphemeralUser(const std::string& email) const OVERRIDE; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 const User* FindUserInList(const std::string& email) const; | 110 const User* FindUserInList(const std::string& email) const; |
| 115 | 111 |
| 116 // Notifies on new user session. | 112 // Notifies on new user session. |
| 117 void NotifyOnLogin(); | 113 void NotifyOnLogin(); |
| 118 | 114 |
| 119 // Reads user's oauth token status from local state preferences. | 115 // Reads user's oauth token status from local state preferences. |
| 120 User::OAuthTokenStatus LoadUserOAuthStatus(const std::string& username) const; | 116 User::OAuthTokenStatus LoadUserOAuthStatus(const std::string& username) const; |
| 121 | 117 |
| 122 void SetCurrentUserIsOwner(bool is_current_user_owner); | 118 void SetCurrentUserIsOwner(bool is_current_user_owner); |
| 123 | 119 |
| 124 // Stores layout and type preference in local state. Runs on UI thread. | |
| 125 void SaveWallpaperToLocalState(const std::string& username, | |
| 126 const std::string& wallpaper_path, | |
| 127 ash::WallpaperLayout layout, | |
| 128 User::WallpaperType type); | |
| 129 | |
| 130 // Updates current user ownership on UI thread. | 120 // Updates current user ownership on UI thread. |
| 131 void UpdateOwnership(DeviceSettingsService::OwnershipStatus status, | 121 void UpdateOwnership(DeviceSettingsService::OwnershipStatus status, |
| 132 bool is_owner); | 122 bool is_owner); |
| 133 | 123 |
| 134 // Triggers an asynchronous ownership check. | 124 // Triggers an asynchronous ownership check. |
| 135 void CheckOwnership(); | 125 void CheckOwnership(); |
| 136 | 126 |
| 137 // Creates a new User instance. | 127 // Creates a new User instance. |
| 138 User* CreateUser(const std::string& email, bool is_ephemeral) const; | 128 User* CreateUser(const std::string& email, bool is_ephemeral) const; |
| 139 | 129 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 ObserverList<UserManager::Observer> observer_list_; | 179 ObserverList<UserManager::Observer> observer_list_; |
| 190 | 180 |
| 191 scoped_ptr<UserImageManagerImpl> user_image_manager_; | 181 scoped_ptr<UserImageManagerImpl> user_image_manager_; |
| 192 | 182 |
| 193 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); | 183 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); |
| 194 }; | 184 }; |
| 195 | 185 |
| 196 } // namespace chromeos | 186 } // namespace chromeos |
| 197 | 187 |
| 198 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ | 188 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ |
| OLD | NEW |