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

Side by Side Diff: chrome/browser/chromeos/login/user.h

Issue 10830111: [cros] Encode user images when set from WebUI (regression fix). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_USER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // Returns the human name to display for this user. 59 // Returns the human name to display for this user.
60 string16 GetDisplayName() const; 60 string16 GetDisplayName() const;
61 61
62 // Returns the account name part of the email. Use the display form of the 62 // Returns the account name part of the email. Use the display form of the
63 // email if available and use_display_name == true. Otherwise use canonical. 63 // email if available and use_display_name == true. Otherwise use canonical.
64 std::string GetAccountName(bool use_display_email) const; 64 std::string GetAccountName(bool use_display_email) const;
65 65
66 // The image for this user. 66 // The image for this user.
67 const gfx::ImageSkia& image() const { return user_image_.image(); } 67 const gfx::ImageSkia& image() const { return user_image_.image(); }
68 68
69 bool has_default_image() const { 69 // Whether the user has a default image.
70 return image_index_ >= 0 && image_index_ < kDefaultImagesCount; 70 bool HasDefaultImage() const;
71 }
72 71
73 int image_index() const { return image_index_; } 72 int image_index() const { return image_index_; }
74 bool has_raw_image() const { return user_image_.has_raw_image(); } 73 bool has_raw_image() const { return user_image_.has_raw_image(); }
75 // Returns raw representation of static user image. 74 // Returns raw representation of static user image.
76 const UserImage::RawImage& raw_image() const { 75 const UserImage::RawImage& raw_image() const {
77 return user_image_.raw_image(); 76 return user_image_.raw_image();
78 } 77 }
79 bool has_animated_image() const { return user_image_.has_animated_image(); } 78 bool has_animated_image() const { return user_image_.has_animated_image(); }
80 // Returns raw representation of animated user image. 79 // Returns raw representation of animated user image.
81 const UserImage::RawImage& animated_image() const { 80 const UserImage::RawImage& animated_image() const {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 153
155 DISALLOW_COPY_AND_ASSIGN(User); 154 DISALLOW_COPY_AND_ASSIGN(User);
156 }; 155 };
157 156
158 // List of known users. 157 // List of known users.
159 typedef std::vector<User*> UserList; 158 typedef std::vector<User*> UserList;
160 159
161 } // namespace chromeos 160 } // namespace chromeos
162 161
163 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_ 162 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698