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

Unified Diff: chrome/browser/chromeos/login/user_manager.cc

Issue 8634007: [cros] Users without no profile image get a gray avatar when Local State is loaded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user_manager.cc
diff --git a/chrome/browser/chromeos/login/user_manager.cc b/chrome/browser/chromeos/login/user_manager.cc
index 975b85c0fa5c3b553709931ff44c0d022da4f967..4adcf617f0b00174d69117f87391eff258f4412a 100644
--- a/chrome/browser/chromeos/login/user_manager.cc
+++ b/chrome/browser/chromeos/login/user_manager.cc
@@ -79,8 +79,7 @@ const char kStubUser[] = "stub-user@example.com";
const char kImagePathNodeName[] = "path";
const char kImageIndexNodeName[] = "index";
-// Index of the default image used as stub while the real user image is loading
-// from file and for the |kStubUser| user.
+// Index of the default image used for the |kStubUser| user.
const int kStubDefaultImageIndex = 0;
// Delay betweeen user login and attempt to update user's profile image.
@@ -591,7 +590,8 @@ void UserManager::EnsureUsersLoaded() {
} else {
int image_index = User::kExternalImageIndex;
// Until image has been loaded, use a stub.
- user->SetImage(GetDefaultImage(kStubDefaultImageIndex),
+ user->SetImage(*ResourceBundle::GetSharedInstance().
+ GetBitmapNamed(IDR_PROFILE_PICTURE_LOADING),
image_index);
DCHECK(!image_path.empty());
// Load user image asynchronously.
@@ -615,8 +615,9 @@ void UserManager::EnsureUsersLoaded() {
// after user logs in).
DCHECK(!image_path.empty() ||
image_index == User::kProfileImageIndex);
- // Until image has been loaded, use a stub.
- user->SetImage(GetDefaultImage(kStubDefaultImageIndex),
+ // Until image has been loaded, use a gray avatar.
+ user->SetImage(*ResourceBundle::GetSharedInstance().
+ GetBitmapNamed(IDR_PROFILE_PICTURE_LOADING),
image_index);
if (!image_path.empty()) {
// Load user image asynchronously.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698