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

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

Issue 398753004: [cros] Move User class to user_manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/chromeos/login/users/user.h" 10 #include "components/user_manager/user.h"
11 11
12 class PrefRegistrySimple; 12 class PrefRegistrySimple;
13 13
14 namespace base { 14 namespace base {
15 class FilePath; 15 class FilePath;
16 } 16 }
17 17
18 namespace gfx { 18 namespace gfx {
19 class ImageSkia; 19 class ImageSkia;
20 } 20 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. If 59 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. If
60 // the user is not logged-in or the last |DownloadProfileImage| call 60 // the user is not logged-in or the last |DownloadProfileImage| call
61 // has failed, a default grey avatar will be used until the user logs 61 // has failed, a default grey avatar will be used until the user logs
62 // in and profile image is downloaded successfully. 62 // in and profile image is downloaded successfully.
63 virtual void SaveUserImageFromProfileImage() = 0; 63 virtual void SaveUserImageFromProfileImage() = 0;
64 64
65 // Deletes user image and the corresponding image file. 65 // Deletes user image and the corresponding image file.
66 virtual void DeleteUserImage() = 0; 66 virtual void DeleteUserImage() = 0;
67 67
68 // Starts downloading the profile image for the user. If user's image 68 // Starts downloading the profile image for the user. If user's image
69 // index is |kProfileImageIndex|, newly downloaded image is immediately 69 // index is |USER_IMAGE_PROFILE|, newly downloaded image is immediately
70 // set as user's current picture. |reason| is an arbitrary string 70 // set as user's current picture. |reason| is an arbitrary string
71 // (used to report UMA histograms with download times). 71 // (used to report UMA histograms with download times).
72 virtual void DownloadProfileImage(const std::string& reason) = 0; 72 virtual void DownloadProfileImage(const std::string& reason) = 0;
73 73
74 // Returns the result of the last successful profile image download, if any. 74 // Returns the result of the last successful profile image download, if any.
75 // Otherwise, returns an empty bitmap. 75 // Otherwise, returns an empty bitmap.
76 virtual const gfx::ImageSkia& DownloadedProfileImage() const = 0; 76 virtual const gfx::ImageSkia& DownloadedProfileImage() const = 0;
77 77
78 // Returns sync observer attached to the user. Returns NULL if current 78 // Returns sync observer attached to the user. Returns NULL if current
79 // user can't sync images or user is not logged in. 79 // user can't sync images or user is not logged in.
(...skipping 21 matching lines...) Expand all
101 const std::string& user_id() const { return user_id_; } 101 const std::string& user_id() const { return user_id_; }
102 102
103 // ID of user which images are managed by current instance of 103 // ID of user which images are managed by current instance of
104 // UserImageManager. 104 // UserImageManager.
105 const std::string user_id_; 105 const std::string user_id_;
106 }; 106 };
107 107
108 } // namespace chromeos 108 } // namespace chromeos
109 109
110 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_H_ 110 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698