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

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: Small fixes to comments. 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 5c79430ffc1322483da4cdced4d539e0a3ed5c45..65b555db5d0ef52dc1e7b4fb46347141710bc968 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"
@@ -257,7 +258,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,
@@ -302,7 +304,8 @@ void ChangePictureOptionsHandler::FileSelected(const FilePath& path,
void ChangePictureOptionsHandler::OnPhotoAccepted(const gfx::ImageSkia& 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