| 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 COMPONENTS_USER_MANAGER_USER_H_ | 5 #ifndef COMPONENTS_USER_MANAGER_USER_H_ |
| 6 #define COMPONENTS_USER_MANAGER_USER_H_ | 6 #define COMPONENTS_USER_MANAGER_USER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 // Whether the user has a default image. | 132 // Whether the user has a default image. |
| 133 bool HasDefaultImage() const; | 133 bool HasDefaultImage() const; |
| 134 | 134 |
| 135 int image_index() const { return image_index_; } | 135 int image_index() const { return image_index_; } |
| 136 bool has_image_bytes() const { return user_image_->has_image_bytes(); } | 136 bool has_image_bytes() const { return user_image_->has_image_bytes(); } |
| 137 // Returns bytes representation of static user image for WebUI. | 137 // Returns bytes representation of static user image for WebUI. |
| 138 scoped_refptr<base::RefCountedBytes> image_bytes() const { | 138 scoped_refptr<base::RefCountedBytes> image_bytes() const { |
| 139 return user_image_->image_bytes(); | 139 return user_image_->image_bytes(); |
| 140 } | 140 } |
| 141 // Returns image format of the bytes representation of static user image |
| 142 // for WebUI. |
| 143 UserImage::ImageFormat image_format() const { |
| 144 return user_image_->image_format(); |
| 145 } |
| 141 | 146 |
| 142 // Whether |user_image_| contains data in format that is considered safe to | 147 // Whether |user_image_| contains data in format that is considered safe to |
| 143 // decode in sensitive environment (on Login screen). | 148 // decode in sensitive environment (on Login screen). |
| 144 bool image_is_safe_format() const { return user_image_->is_safe_format(); } | 149 bool image_is_safe_format() const { return user_image_->is_safe_format(); } |
| 145 | 150 |
| 146 // Returns the URL of user image, if there is any. Currently only the profile | 151 // Returns the URL of user image, if there is any. Currently only the profile |
| 147 // image has a URL, for other images empty URL is returned. | 152 // image has a URL, for other images empty URL is returned. |
| 148 GURL image_url() const { return user_image_->url(); } | 153 GURL image_url() const { return user_image_->url(); } |
| 149 | 154 |
| 150 // True if user image is a stub (while real image is being loaded from file). | 155 // True if user image is a stub (while real image is being loaded from file). |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 307 |
| 303 DISALLOW_COPY_AND_ASSIGN(User); | 308 DISALLOW_COPY_AND_ASSIGN(User); |
| 304 }; | 309 }; |
| 305 | 310 |
| 306 // List of known users. | 311 // List of known users. |
| 307 using UserList = std::vector<User*>; | 312 using UserList = std::vector<User*>; |
| 308 | 313 |
| 309 } // namespace user_manager | 314 } // namespace user_manager |
| 310 | 315 |
| 311 #endif // COMPONENTS_USER_MANAGER_USER_H_ | 316 #endif // COMPONENTS_USER_MANAGER_USER_H_ |
| OLD | NEW |