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

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

Issue 8822015: [cros] Profile image downloader is always reset after a download. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments added. Created 9 years 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 53c14678edb53337344390e8d993b856e27bf722..78f8344c8157e0e82a2dc4821bbc514023827b05 100644
--- a/chrome/browser/chromeos/login/user.h
+++ b/chrome/browser/chromeos/login/user.h
@@ -53,6 +53,9 @@ class User {
const SkBitmap& image() const { return image_; }
int image_index() const { return image_index_; }
+ // True if user image is a stub (while real image is being loaded from file).
+ bool image_is_stub() const { return image_is_stub_; }
+
// OAuth token status for this user.
OAuthTokenStatus oauth_token_status() const { return oauth_token_status_; }
@@ -68,6 +71,9 @@ class User {
// Setters are private so only UserManager can call them.
void SetImage(const SkBitmap& image, int image_index);
+ // Sets a stub image until the next |SetImage| call. |image_index| may be
+ // one of |kExternalImageIndex| or |kProfileImageIndex|.
+ void SetStubImage(int image_index);
void set_oauth_token_status(OAuthTokenStatus status) {
oauth_token_status_ = status;
@@ -87,6 +93,9 @@ class User {
// |kProfileImageIndex|.
int image_index_;
+ // True if current user image is a stub set by a |SetStubImage| call.
+ bool image_is_stub_;
+
DISALLOW_COPY_AND_ASSIGN(User);
};
« 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