| 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 <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // |downloaded_profile_image_| is currently available. | 192 // |downloaded_profile_image_| is currently available. |
| 193 GURL profile_image_url_; | 193 GURL profile_image_url_; |
| 194 | 194 |
| 195 // Whether a download of the currently logged-in user's profile image has been | 195 // Whether a download of the currently logged-in user's profile image has been |
| 196 // explicitly requested by a call to DownloadProfileImage() and has not been | 196 // explicitly requested by a call to DownloadProfileImage() and has not been |
| 197 // satisfied by a successful download yet. | 197 // satisfied by a successful download yet. |
| 198 bool profile_image_requested_; | 198 bool profile_image_requested_; |
| 199 | 199 |
| 200 // Timer used to start a profile data download shortly after login and to | 200 // Timer used to start a profile data download shortly after login and to |
| 201 // restart the download after network errors. | 201 // restart the download after network errors. |
| 202 base::OneShotTimer<UserImageManagerImpl> profile_download_one_shot_timer_; | 202 base::OneShotTimer profile_download_one_shot_timer_; |
| 203 | 203 |
| 204 // Timer used to periodically start a profile data, ensuring the profile data | 204 // Timer used to periodically start a profile data, ensuring the profile data |
| 205 // stays up to date. | 205 // stays up to date. |
| 206 base::RepeatingTimer<UserImageManagerImpl> profile_download_periodic_timer_; | 206 base::RepeatingTimer profile_download_periodic_timer_; |
| 207 | 207 |
| 208 // Sync observer for the currently logged-in user. | 208 // Sync observer for the currently logged-in user. |
| 209 scoped_ptr<UserImageSyncObserver> user_image_sync_observer_; | 209 scoped_ptr<UserImageSyncObserver> user_image_sync_observer_; |
| 210 | 210 |
| 211 // Background task runner on which Jobs perform file I/O and the image | 211 // Background task runner on which Jobs perform file I/O and the image |
| 212 // decoders run. | 212 // decoders run. |
| 213 scoped_refptr<base::SequencedTaskRunner> background_task_runner_; | 213 scoped_refptr<base::SequencedTaskRunner> background_task_runner_; |
| 214 | 214 |
| 215 // The currently running job. | 215 // The currently running job. |
| 216 scoped_ptr<Job> job_; | 216 scoped_ptr<Job> job_; |
| 217 | 217 |
| 218 bool has_managed_image_; | 218 bool has_managed_image_; |
| 219 bool user_needs_migration_; | 219 bool user_needs_migration_; |
| 220 | 220 |
| 221 base::WeakPtrFactory<UserImageManagerImpl> weak_factory_; | 221 base::WeakPtrFactory<UserImageManagerImpl> weak_factory_; |
| 222 | 222 |
| 223 DISALLOW_COPY_AND_ASSIGN(UserImageManagerImpl); | 223 DISALLOW_COPY_AND_ASSIGN(UserImageManagerImpl); |
| 224 }; | 224 }; |
| 225 | 225 |
| 226 } // namespace chromeos | 226 } // namespace chromeos |
| 227 | 227 |
| 228 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_ | 228 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_ |
| OLD | NEW |