Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h

Issue 444903002: [cros] user_manager component - move UserManagerBase and UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 14 matching lines...) Expand all
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 UserImage; 34 class UserImage;
35 class UserManager;
35 } 36 }
36 37
37 namespace chromeos { 38 namespace chromeos {
38 39
39 class UserImageSyncObserver; 40 class UserImageSyncObserver;
40 class UserManager;
41 41
42 class UserImageManagerImpl 42 class UserImageManagerImpl
43 : public UserImageManager, 43 : public UserImageManager,
44 public ProfileDownloaderDelegate { 44 public ProfileDownloaderDelegate {
45 public: 45 public:
46 // UserImageManager: 46 // UserImageManager:
47 UserImageManagerImpl(const std::string& user_id, 47 UserImageManagerImpl(const std::string& user_id,
48 UserManager* user_manager); 48 user_manager::UserManager* user_manager);
49 virtual ~UserImageManagerImpl(); 49 virtual ~UserImageManagerImpl();
50 50
51 virtual void LoadUserImage() OVERRIDE; 51 virtual void LoadUserImage() OVERRIDE;
52 virtual void UserLoggedIn(bool user_is_new, bool user_is_local) OVERRIDE; 52 virtual void UserLoggedIn(bool user_is_new, bool user_is_local) OVERRIDE;
53 virtual void SaveUserDefaultImageIndex(int default_image_index) OVERRIDE; 53 virtual void SaveUserDefaultImageIndex(int default_image_index) OVERRIDE;
54 virtual void SaveUserImage( 54 virtual void SaveUserImage(
55 const user_manager::UserImage& user_image) OVERRIDE; 55 const user_manager::UserImage& user_image) OVERRIDE;
56 virtual void SaveUserImageFromFile(const base::FilePath& path) OVERRIDE; 56 virtual void SaveUserImageFromFile(const base::FilePath& path) OVERRIDE;
57 virtual void SaveUserImageFromProfileImage() OVERRIDE; 57 virtual void SaveUserImageFromProfileImage() OVERRIDE;
58 virtual void DeleteUserImage() OVERRIDE; 58 virtual void DeleteUserImage() OVERRIDE;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // Returns immutable version of user with |user_id_|. 146 // Returns immutable version of user with |user_id_|.
147 const user_manager::User* GetUser() const; 147 const user_manager::User* GetUser() const;
148 148
149 // Returns mutable version of user with |user_id_|. 149 // Returns mutable version of user with |user_id_|.
150 user_manager::User* GetUserAndModify() const; 150 user_manager::User* GetUserAndModify() const;
151 151
152 // Returns true if user with |user_id_| is logged in and a regular user. 152 // Returns true if user with |user_id_| is logged in and a regular user.
153 bool IsUserLoggedInAndRegular() const; 153 bool IsUserLoggedInAndRegular() const;
154 154
155 // The user manager. 155 // The user manager.
156 UserManager* user_manager_; 156 user_manager::UserManager* user_manager_;
157 157
158 // Loader for JPEG user images. 158 // Loader for JPEG user images.
159 scoped_refptr<UserImageLoader> image_loader_; 159 scoped_refptr<UserImageLoader> image_loader_;
160 160
161 // Unsafe loader instance for all user images formats. 161 // Unsafe loader instance for all user images formats.
162 scoped_refptr<UserImageLoader> unsafe_image_loader_; 162 scoped_refptr<UserImageLoader> unsafe_image_loader_;
163 163
164 // Whether the |profile_downloader_| is downloading the profile image for the 164 // Whether the |profile_downloader_| is downloading the profile image for the
165 // currently logged-in user (and not just the full name). Only valid when a 165 // currently logged-in user (and not just the full name). Only valid when a
166 // download is currently in progress. 166 // download is currently in progress.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 bool user_needs_migration_; 218 bool user_needs_migration_;
219 219
220 base::WeakPtrFactory<UserImageManagerImpl> weak_factory_; 220 base::WeakPtrFactory<UserImageManagerImpl> weak_factory_;
221 221
222 DISALLOW_COPY_AND_ASSIGN(UserImageManagerImpl); 222 DISALLOW_COPY_AND_ASSIGN(UserImageManagerImpl);
223 }; 223 };
224 224
225 } // namespace chromeos 225 } // namespace chromeos
226 226
227 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_ 227 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698