diff options
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r-- | chrome/browser/sync/profile_sync_service.cc | 14 | ||||
-rw-r--r-- | chrome/browser/sync/profile_sync_service.h | 5 |
2 files changed, 13 insertions, 6 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc index 9eb2acc..335e50d 100644 --- a/chrome/browser/sync/profile_sync_service.cc +++ b/chrome/browser/sync/profile_sync_service.cc @@ -257,6 +257,12 @@ void ProfileSyncService::OnAuthError() { auth_error_time_ == base::TimeTicks::Now(); } + if (!auth_start_time_.is_null()) { + UMA_HISTOGRAM_TIMES("Sync.AuthorizationTimeInNetwork", + base::TimeTicks::Now() - auth_start_time_); + auth_start_time_ = base::TimeTicks(); + } + is_auth_in_progress_ = false; // Fan the notification out to interested UI-thread components. FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged()); @@ -329,17 +335,15 @@ void ProfileSyncService::OnUserSubmittedAuth( is_auth_in_progress_ = true; FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged()); - base::TimeTicks start_time = base::TimeTicks::Now(); + auth_start_time_ = base::TimeTicks::Now(); backend_->Authenticate(username, password); - UMA_HISTOGRAM_TIMES("Sync.AuthorizationTime", - base::TimeTicks::Now() - start_time); } void ProfileSyncService::OnUserAcceptedMergeAndSync() { base::TimeTicks start_time = base::TimeTicks::Now(); bool merge_success = model_associator_->AssociateModels(); - UMA_HISTOGRAM_TIMES("Sync.BookmarkAssociationWithUITime", - base::TimeTicks::Now() - start_time); + UMA_HISTOGRAM_MEDIUM_TIMES("Sync.UserPerceivedBookmarkAssociation", + base::TimeTicks::Now() - start_time); wizard_.Step(SyncSetupWizard::DONE); // TODO(timsteele): error state? if (!merge_success) { diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h index ae2047e..d2a8c2d 100644 --- a/chrome/browser/sync/profile_sync_service.h +++ b/chrome/browser/sync/profile_sync_service.h @@ -246,7 +246,10 @@ class ProfileSyncService : public NotificationObserver, // Sets the last synced time to the current time. void UpdateLastSyncedTime(); - // Time at which error UI is presented for the NTP. + // Time at which we begin an attempt a GAIA authorization. + base::TimeTicks auth_start_time_; + + // Time at which error UI is presented for the new tab page. base::TimeTicks auth_error_time_; // The profile whose data we are synchronizing. |