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

Unified Diff: chrome/browser/chromeos/login/user.h

Issue 10831064: [cros] Remove redundant PNG enconding in UserImage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/user.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user.h
diff --git a/chrome/browser/chromeos/login/user.h b/chrome/browser/chromeos/login/user.h
index cd9a23fdcf2a6834552eb36e1e630c534810ca6e..48d0f6e34d75d6ec0486357acc1b9b76769c6c8e 100644
--- a/chrome/browser/chromeos/login/user.h
+++ b/chrome/browser/chromeos/login/user.h
@@ -22,6 +22,8 @@ extern const char kDemoUser[];
// Username for incognito login.
extern const char kGuestUser[];
+extern const int kDefaultImagesCount;
+
// A class representing information about a previously logged in user.
// Each user has a canonical email (username), returned by |email()| and
// may have a different displayed email (in the raw form as entered by user),
@@ -64,6 +66,10 @@ class User {
// The image for this user.
const gfx::ImageSkia& image() const { return user_image_.image(); }
+ bool has_default_image() const {
+ return image_index_ >= 0 && image_index_ < kDefaultImagesCount;
Nikita (slow) 2012/07/31 01:57:39 nit: This doesn't seem like really "trivial" gette
+ }
+
int image_index() const { return image_index_; }
bool has_raw_image() const { return user_image_.has_raw_image(); }
// Returns raw representation of static user image.
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698