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

Side by Side Diff: chrome/browser/chromeos/login/user_manager_impl.cc

Issue 10836091: [cros] Fix regression making impossible to select grey G+ avatar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/browser/chromeos/login/user_image.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/chromeos/login/user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/user_manager_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/desktop_background/desktop_background_controller.h" 9 #include "ash/desktop_background/desktop_background_controller.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 if (!downloaded_profile_image_.empty()) { 564 if (!downloaded_profile_image_.empty()) {
565 // Profile image has already been downloaded, so save it to file right now. 565 // Profile image has already been downloaded, so save it to file right now.
566 DCHECK(profile_image_url_.is_valid()); 566 DCHECK(profile_image_url_.is_valid());
567 SaveUserImageInternal( 567 SaveUserImageInternal(
568 username, 568 username,
569 User::kProfileImageIndex, profile_image_url_, 569 User::kProfileImageIndex, profile_image_url_,
570 UserImage::CreateAndEncode(downloaded_profile_image_)); 570 UserImage::CreateAndEncode(downloaded_profile_image_));
571 } else { 571 } else {
572 // No profile image - use the stub image (gray avatar). 572 // No profile image - use the stub image (gray avatar).
573 SetUserImage(username, User::kProfileImageIndex, 573 SetUserImage(username, User::kProfileImageIndex,
574 GURL(), UserImage(SkBitmap())); 574 GURL(), UserImage::CreateAndEncode(SkBitmap()));
575 SaveImageToLocalState(username, "", User::kProfileImageIndex, 575 SaveImageToLocalState(username, "", User::kProfileImageIndex,
576 GURL(), false); 576 GURL(), false);
577 } 577 }
578 } 578 }
579 579
580 void UserManagerImpl::DownloadProfileImage(const std::string& reason) { 580 void UserManagerImpl::DownloadProfileImage(const std::string& reason) {
581 DownloadProfileData(reason, true); 581 DownloadProfileData(reason, true);
582 } 582 }
583 583
584 void UserManagerImpl::Observe(int type, 584 void UserManagerImpl::Observe(int type,
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 BrowserThread::PostTask( 1372 BrowserThread::PostTask(
1373 BrowserThread::FILE, 1373 BrowserThread::FILE,
1374 FROM_HERE, 1374 FROM_HERE,
1375 base::Bind(&UserManagerImpl::DeleteUserImage, 1375 base::Bind(&UserManagerImpl::DeleteUserImage,
1376 base::Unretained(this), 1376 base::Unretained(this),
1377 image_path)); 1377 image_path));
1378 } 1378 }
1379 } 1379 }
1380 1380
1381 } // namespace chromeos 1381 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_image.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698