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

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

Issue 8360003: [cros] OOBE: add histograms for Profile image fetching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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/chromeos/login/user_image_screen.cc
diff --git a/chrome/browser/chromeos/login/user_image_screen.cc b/chrome/browser/chromeos/login/user_image_screen.cc
index e15838222094edc8efa8aaffc737ed49bf023add..fdedafe49216136adc05ac77da5ca66c31c6b90b 100644
--- a/chrome/browser/chromeos/login/user_image_screen.cc
+++ b/chrome/browser/chromeos/login/user_image_screen.cc
@@ -56,6 +56,10 @@ void UserImageScreen::Show() {
if (!actor_)
return;
+ profile_image_downloader_.reset(new ProfileImageDownloader(this));
+ profile_image_downloader_->Start();
+ profile_image_load_start_time_ = base::Time::Now();
whywhat 2011/10/20 16:14:50 Isn't there a race (in theory) when we download th
Ivan Korotkov 2011/10/20 17:13:16 Hm, right.
+
actor_->Show();
UserManager* user_manager = UserManager::Get();
@@ -74,9 +78,6 @@ void UserImageScreen::Show() {
WizardAccessibilityHelper::GetInstance()->MaybeSpeak(
l10n_util::GetStringUTF8(IDS_OPTIONS_CHANGE_PICTURE_DIALOG_TEXT).c_str(),
false, false);
-
- profile_image_downloader_.reset(new ProfileImageDownloader(this));
- profile_image_downloader_->Start();
}
void UserImageScreen::Hide() {
@@ -181,6 +182,12 @@ void UserImageScreen::Observe(int type,
}
void UserImageScreen::OnDownloadSuccess(const SkBitmap& image) {
+ DCHECK(profile_image_load_start_time_.is_null());
+
+ base::TimeDelta delta = base::Time::Now() - profile_image_load_start_time_;
+ VLOG(1) << "Profile image download time: " << delta.InSecondsF();
+ UMA_HISTOGRAM_TIMES("UserImage.FirstTimeProfileImageDownload", delta);
+
// TODO(avayvod): Check for the default image.
if (actor_)
actor_->AddProfileImage(image);

Powered by Google App Engine
This is Rietveld 408576698