| 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 13 matching lines...) Expand all Loading... |
| 24 #include "ui/gfx/image/image_skia.h" | 24 #include "ui/gfx/image/image_skia.h" |
| 25 | 25 |
| 26 class ProfileDownloader; | 26 class ProfileDownloader; |
| 27 | 27 |
| 28 namespace base { | 28 namespace base { |
| 29 class FilePath; | 29 class FilePath; |
| 30 class SequencedTaskRunner; | 30 class SequencedTaskRunner; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace user_manager { | 33 namespace user_manager { |
| 34 class UserID; |
| 34 class UserImage; | 35 class UserImage; |
| 35 class UserManager; | 36 class UserManager; |
| 36 } | 37 } |
| 37 | 38 |
| 38 namespace chromeos { | 39 namespace chromeos { |
| 39 | 40 |
| 40 class UserImageSyncObserver; | 41 class UserImageSyncObserver; |
| 41 | 42 |
| 42 class UserImageManagerImpl | 43 class UserImageManagerImpl |
| 43 : public UserImageManager, | 44 : public UserImageManager, |
| 44 public ProfileDownloaderDelegate { | 45 public ProfileDownloaderDelegate { |
| 45 public: | 46 public: |
| 46 // UserImageManager: | 47 // UserImageManager: |
| 47 UserImageManagerImpl(const std::string& user_id, | 48 UserImageManagerImpl(const user_manager::UserID& user_id, |
| 48 user_manager::UserManager* user_manager); | 49 user_manager::UserManager* user_manager); |
| 49 ~UserImageManagerImpl() override; | 50 ~UserImageManagerImpl() override; |
| 50 | 51 |
| 51 void LoadUserImage() override; | 52 void LoadUserImage() override; |
| 52 void UserLoggedIn(bool user_is_new, bool user_is_local) override; | 53 void UserLoggedIn(bool user_is_new, bool user_is_local) override; |
| 53 void UserProfileCreated() override; | 54 void UserProfileCreated() override; |
| 54 void SaveUserDefaultImageIndex(int default_image_index) override; | 55 void SaveUserDefaultImageIndex(int default_image_index) override; |
| 55 void SaveUserImage(const user_manager::UserImage& user_image) override; | 56 void SaveUserImage(const user_manager::UserImage& user_image) override; |
| 56 void SaveUserImageFromFile(const base::FilePath& path) override; | 57 void SaveUserImageFromFile(const base::FilePath& path) override; |
| 57 void SaveUserImageFromProfileImage() override; | 58 void SaveUserImageFromProfileImage() override; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 bool user_needs_migration_; | 219 bool user_needs_migration_; |
| 219 | 220 |
| 220 base::WeakPtrFactory<UserImageManagerImpl> weak_factory_; | 221 base::WeakPtrFactory<UserImageManagerImpl> weak_factory_; |
| 221 | 222 |
| 222 DISALLOW_COPY_AND_ASSIGN(UserImageManagerImpl); | 223 DISALLOW_COPY_AND_ASSIGN(UserImageManagerImpl); |
| 223 }; | 224 }; |
| 224 | 225 |
| 225 } // namespace chromeos | 226 } // namespace chromeos |
| 226 | 227 |
| 227 #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 |