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

Unified Diff: chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler2.cc

Issue 10454044: Added support for animated/nonanimated user image. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added clarifying comment. Created 8 years, 7 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
Index: chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler2.cc b/chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler2.cc
index f2fa95e5fab9ae46a1735991154f42a8d436dbfc..883681459fa16781923710190e146aa1e0aa9fc0 100644
--- a/chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler2.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler2.cc
@@ -13,6 +13,7 @@
#include "base/values.h"
#include "chrome/browser/chromeos/login/camera_detector.h"
#include "chrome/browser/chromeos/login/default_user_images.h"
+#include "chrome/browser/chromeos/login/user_image.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/options/take_photo_dialog.h"
#include "chrome/browser/profiles/profile.h"
@@ -258,7 +259,8 @@ void ChangePictureOptionsHandler::HandleSelectImage(const ListValue* args) {
// (profile image, current image from file) is easier.
DCHECK(!previous_image_.empty());
- user_manager->SaveUserImage(user.email(), previous_image_);
+ user_manager->SaveUserImage(user.email(),
+ chromeos::UserImage(previous_image_));
UMA_HISTOGRAM_ENUMERATION("UserImage.ChangeChoice",
kHistogramImageOld,
@@ -303,7 +305,8 @@ void ChangePictureOptionsHandler::FileSelected(const FilePath& path,
void ChangePictureOptionsHandler::OnPhotoAccepted(const SkBitmap& photo) {
UserManager* user_manager = UserManager::Get();
- user_manager->SaveUserImage(user_manager->GetLoggedInUser().email(), photo);
+ user_manager->SaveUserImage(user_manager->GetLoggedInUser().email(),
+ chromeos::UserImage(photo));
UMA_HISTOGRAM_ENUMERATION("UserImage.ChangeChoice",
kHistogramImageFromCamera,
kHistogramImagesCount);

Powered by Google App Engine
This is Rietveld 408576698