Index: chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc |
diff --git a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc |
index 92d58272c33212c09e8c393959d33aa60f9016e7..7c78298b60499917e155ee572658e96969191a67 100644 |
--- a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc |
@@ -304,10 +304,18 @@ void ChangePictureOptionsHandler::OnPhotoAccepted(const SkBitmap& photo) { |
void ChangePictureOptionsHandler::OnDownloadSuccess(const SkBitmap& image) { |
// Profile image has been downloaded. |
- // TODO(ivankr): check if profile image is default image. |
+ VLOG(1) << "Download of profile image on change picture failed."; |
+ UMA_HISTOGRAM_ENUMERATION("UserImageDownloadResult.ChangePicture", |
+ ProfileImageDownloader::kDownloadSuccess, |
+ ProfileImageDownloader::kDownloadResultsCount); |
std::string profile_image_data_url = web_ui_util::GetImageDataUrl(image); |
if (profile_image_data_url != profile_image_data_url_) { |
+ VLOG(1) << "Updating profile image for the user"; |
Ivan Korotkov
2011/10/27 13:58:15
As discussed offline, this will report a change ev
|
+ UMA_HISTOGRAM_ENUMERATION("UserImageDownloadResult.ChangePicture", |
+ ProfileImageDownloader::kDownloadSuccessChanged, |
+ ProfileImageDownloader::kDownloadResultsCount); |
+ |
// Differs from the current profile image. |
profile_image_ = image; |
profile_image_data_url_ = profile_image_data_url; |
@@ -319,6 +327,20 @@ void ChangePictureOptionsHandler::OnDownloadSuccess(const SkBitmap& image) { |
} |
} |
+void ChangePictureOptionsHandler::OnDownloadFailure() { |
+ VLOG(1) << "Download of profile image on change picture failed."; |
+ UMA_HISTOGRAM_ENUMERATION("UserImageDownloadResult.ChangePicture", |
+ ProfileImageDownloader::kDownloadFailure, |
+ ProfileImageDownloader::kDownloadResultsCount); |
+} |
+ |
+void ChangePictureOptionsHandler::OnDownloadDefaultImage() { |
+ VLOG(1) << "User still has the default profile image."; |
+ UMA_HISTOGRAM_ENUMERATION("UserImageDownloadResult.ChangePicture", |
+ ProfileImageDownloader::kDownloadDefault, |
+ ProfileImageDownloader::kDownloadResultsCount); |
+} |
+ |
void ChangePictureOptionsHandler::CheckCameraPresence() { |
CameraDetector::StartPresenceCheck( |
base::Bind(&ChangePictureOptionsHandler::OnCameraPresenceCheckDone, |