| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // with download times). | 129 // with download times). |
| 130 void DownloadProfileData(const std::string& reason); | 130 void DownloadProfileData(const std::string& reason); |
| 131 | 131 |
| 132 // Removes ther user from the dictionary |prefs_dict_root| in | 132 // Removes ther user from the dictionary |prefs_dict_root| in |
| 133 // local state and deletes the image file that the dictionary | 133 // local state and deletes the image file that the dictionary |
| 134 // referenced for that user. | 134 // referenced for that user. |
| 135 void DeleteUserImageAndLocalStateEntry(const char* prefs_dict_root); | 135 void DeleteUserImageAndLocalStateEntry(const char* prefs_dict_root); |
| 136 | 136 |
| 137 // Called when a Job updates the copy of the user image held in | 137 // Called when a Job updates the copy of the user image held in |
| 138 // memory. Allows |this| to update |downloaded_profile_image_| and | 138 // memory. Allows |this| to update |downloaded_profile_image_| and |
| 139 // send a NOTIFICATION_LOGIN_USER_IMAGE_CHANGED notification. | 139 // notify user manager about user image change. |
| 140 void OnJobChangedUserImage(); | 140 void OnJobChangedUserImage(); |
| 141 | 141 |
| 142 // Called when a Job for the user finishes. | 142 // Called when a Job for the user finishes. |
| 143 void OnJobDone(); | 143 void OnJobDone(); |
| 144 | 144 |
| 145 // Create a sync observer if a user is logged in, the user's user image is | 145 // Create a sync observer if a user is logged in, the user's user image is |
| 146 // allowed to be synced and no sync observer exists yet. | 146 // allowed to be synced and no sync observer exists yet. |
| 147 void TryToCreateImageSyncObserver(); | 147 void TryToCreateImageSyncObserver(); |
| 148 | 148 |
| 149 // Returns immutable version of user with |user_id_|. | 149 // Returns immutable version of user with |user_id_|. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 bool has_managed_image_; | 214 bool has_managed_image_; |
| 215 | 215 |
| 216 base::WeakPtrFactory<UserImageManagerImpl> weak_factory_; | 216 base::WeakPtrFactory<UserImageManagerImpl> weak_factory_; |
| 217 | 217 |
| 218 DISALLOW_COPY_AND_ASSIGN(UserImageManagerImpl); | 218 DISALLOW_COPY_AND_ASSIGN(UserImageManagerImpl); |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 } // namespace chromeos | 221 } // namespace chromeos |
| 222 | 222 |
| 223 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_ | 223 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_ |
| OLD | NEW |