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

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

Issue 1794323003: Make user_manager::UserImage non-copyable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: just rebase Created 4 years, 8 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
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 "components/user_manager/user.h" 10 #include "components/user_manager/user.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // Indicates that a user profile was created. 46 // Indicates that a user profile was created.
47 virtual void UserProfileCreated() = 0; 47 virtual void UserProfileCreated() = 0;
48 48
49 // Sets user image to the default image with index |image_index|, sends 49 // Sets user image to the default image with index |image_index|, sends
50 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. 50 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State.
51 virtual void SaveUserDefaultImageIndex(int image_index) = 0; 51 virtual void SaveUserDefaultImageIndex(int image_index) = 0;
52 52
53 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and 53 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and
54 // updates Local State. 54 // updates Local State.
55 virtual void SaveUserImage(const user_manager::UserImage& user_image) = 0; 55 virtual void SaveUserImage(
56 scoped_ptr<user_manager::UserImage> user_image) = 0;
56 57
57 // Tries to load user image from disk; if successful, sets it for the user, 58 // Tries to load user image from disk; if successful, sets it for the user,
58 // sends LOGIN_USER_IMAGE_CHANGED notification and updates Local State. 59 // sends LOGIN_USER_IMAGE_CHANGED notification and updates Local State.
59 virtual void SaveUserImageFromFile(const base::FilePath& path) = 0; 60 virtual void SaveUserImageFromFile(const base::FilePath& path) = 0;
60 61
61 // Sets profile image as user image for the user, sends 62 // Sets profile image as user image for the user, sends
62 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. If 63 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. If
63 // the user is not logged-in or the last |DownloadProfileImage| call 64 // the user is not logged-in or the last |DownloadProfileImage| call
64 // has failed, a default grey avatar will be used until the user logs 65 // has failed, a default grey avatar will be used until the user logs
65 // in and profile image is downloaded successfully. 66 // in and profile image is downloaded successfully.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 const std::string& user_id() const { return user_id_; } 105 const std::string& user_id() const { return user_id_; }
105 106
106 // ID of user which images are managed by current instance of 107 // ID of user which images are managed by current instance of
107 // UserImageManager. 108 // UserImageManager.
108 const std::string user_id_; 109 const std::string user_id_;
109 }; 110 };
110 111
111 } // namespace chromeos 112 } // namespace chromeos
112 113
113 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_H_ 114 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698