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

Side by Side Diff: components/user_manager/user.h

Issue 1747843002: Rename raw_image() to image_bytes() in UserImage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 9 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 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 bool using_saml() const { return using_saml_; } 120 bool using_saml() const { return using_saml_; }
121 121
122 // Returns the account name part of the email. Use the display form of the 122 // Returns the account name part of the email. Use the display form of the
123 // email if available and use_display_name == true. Otherwise use canonical. 123 // email if available and use_display_name == true. Otherwise use canonical.
124 std::string GetAccountName(bool use_display_email) const; 124 std::string GetAccountName(bool use_display_email) const;
125 125
126 // Whether the user has a default image. 126 // Whether the user has a default image.
127 bool HasDefaultImage() const; 127 bool HasDefaultImage() const;
128 128
129 int image_index() const { return image_index_; } 129 int image_index() const { return image_index_; }
130 bool has_raw_image() const { return user_image_.has_raw_image(); } 130 bool has_image_bytes() const { return user_image_.has_image_bytes(); }
131 // Returns raw representation of static user image. 131 // Returns bytes representation of static user image for WebUI.
132 const UserImage::RawImage& raw_image() const { 132 const UserImage::Bytes& image_bytes() const {
133 return user_image_.raw_image(); 133 return user_image_.image_bytes();
134 } 134 }
135 135
136 // Whether |raw_image| contains data in format that is considered safe to 136 // Whether |user_image_| contains data in format that is considered safe to
137 // decode in sensitive environment (on Login screen). 137 // decode in sensitive environment (on Login screen).
138 bool image_is_safe_format() const { return user_image_.is_safe_format(); } 138 bool image_is_safe_format() const { return user_image_.is_safe_format(); }
139 139
140 // Returns the URL of user image, if there is any. Currently only the profile 140 // Returns the URL of user image, if there is any. Currently only the profile
141 // image has a URL, for other images empty URL is returned. 141 // image has a URL, for other images empty URL is returned.
142 GURL image_url() const { return user_image_.url(); } 142 GURL image_url() const { return user_image_.url(); }
143 143
144 // True if user image is a stub (while real image is being loaded from file). 144 // True if user image is a stub (while real image is being loaded from file).
145 bool image_is_stub() const { return image_is_stub_; } 145 bool image_is_stub() const { return image_is_stub_; }
146 146
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 DISALLOW_COPY_AND_ASSIGN(User); 299 DISALLOW_COPY_AND_ASSIGN(User);
300 }; 300 };
301 301
302 // List of known users. 302 // List of known users.
303 using UserList = std::vector<User*>; 303 using UserList = std::vector<User*>;
304 304
305 } // namespace user_manager 305 } // namespace user_manager
306 306
307 #endif // COMPONENTS_USER_MANAGER_USER_H_ 307 #endif // COMPONENTS_USER_MANAGER_USER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/user_image_source.cc ('k') | components/user_manager/user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698