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

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: Merge with svn 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') | chrome/browser/chromeos/login/user.cc » ('J')
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..82d2e32656fcc3bbed28512aa3fec23cf7390a62 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_; }
whywhat 2011/12/06 17:51:31 optional: rename method to is_image_downloading()?
Ivan Korotkov 2011/12/08 10:52:20 This isn't actually User's knowledge if image is d
+
// OAuth token status for this user.
OAuthTokenStatus oauth_token_status() const { return oauth_token_status_; }
@@ -68,6 +71,8 @@ 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.
+ void SetStubImage(int image_index);
whywhat 2011/12/06 17:51:31 Document what index is.
Ivan Korotkov 2011/12/08 10:52:20 Done.
void set_oauth_token_status(OAuthTokenStatus status) {
oauth_token_status_ = status;
@@ -87,6 +92,9 @@ class User {
// |kProfileImageIndex|.
int image_index_;
+ // This is true after a |SetStubImage| call and until a |SetImage| call.
whywhat 2011/12/06 17:51:31 nit: sounds kind of hacky, no? Could it be "True i
Ivan Korotkov 2011/12/08 10:52:20 Rephrased.
+ bool image_is_stub_;
+
DISALLOW_COPY_AND_ASSIGN(User);
};
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/user.cc » ('j') | chrome/browser/chromeos/login/user.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698