diff options
author | brg@chromium.com <brg@chromium.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 02:17:06 +0000 |
---|---|---|
committer | brg@chromium.com <brg@chromium.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 02:17:06 +0000 |
commit | 1f97a11d47048f09134e36265661c1082d1f82d3 (patch) | |
tree | 30e8c919ec8f50a77b61dc1347d3d0ff6cac26a6 /chrome/browser/views | |
parent | 4e6719f89e1323405252edb5ea78084cb7867562 (diff) | |
download | chromium_src-1f97a11d47048f09134e36265661c1082d1f82d3.zip chromium_src-1f97a11d47048f09134e36265661c1082d1f82d3.tar.gz chromium_src-1f97a11d47048f09134e36265661c1082d1f82d3.tar.bz2 |
Add UMA histograms for chrome-sync.We add the following histograms:Sync.MergeAndSyncNeededCountNumber of times merge and sync is needed to run.Sync.AuthorizationTimeTime taken during initial authorization.Sync.UserPerceivedAuthorizationTimeTime the user spends looking at the authorization dialog.Sync.BookmarkAssociationTimeTime taken during bookmark association.Sync.ReauthorizationTimeTime taken from startup for the user to reauthorize.
Sync.Events
This is an enumeration of distinct events of the following types:
Number of times sync was started from the ad in NTP.Number of times sync was started from the Wrench menu.Number of times sync was started from Wrench->Options.Number of times sync was stopped from Wrench->Options.Number of times sync was stopped during the sign-on process.Number of times sync was stopped after successfully authorized.Number of times sync was cancelled when the merge dialog was surfaces.
BUG=None.
Test=None.
Review URL: http://codereview.chromium.org/165111
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/options/content_page_view.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/sync/sync_setup_flow.cc | 27 | ||||
-rw-r--r-- | chrome/browser/views/sync/sync_setup_flow.h | 14 |
3 files changed, 38 insertions, 5 deletions
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc index b838e7b..af2a4df 100644 --- a/chrome/browser/views/options/content_page_view.cc +++ b/chrome/browser/views/options/content_page_view.cc @@ -137,8 +137,10 @@ void ContentPageView::ButtonPressed(views::Button* sender) { DCHECK(sync_service_); if (sync_service_->IsSyncEnabledByUser()) { sync_service_->DisableForUser(); + ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); } else { sync_service_->EnableForUser(); + ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_OPTIONS); } #endif } diff --git a/chrome/browser/views/sync/sync_setup_flow.cc b/chrome/browser/views/sync/sync_setup_flow.cc index 7cb010c..c0386a3 100644 --- a/chrome/browser/views/sync/sync_setup_flow.cc +++ b/chrome/browser/views/sync/sync_setup_flow.cc @@ -4,6 +4,7 @@ #ifdef CHROME_PERSONALIZATION +#include "base/histogram.h" #include "base/json_reader.h" #include "base/json_writer.h" #include "base/string_util.h" @@ -26,7 +27,7 @@ static const wchar_t* kMergeIFrameXPath = L"//iframe[@id='merge']"; // Helper function to read the JSON string from the Value parameter. static std::string GetJsonResponse(const Value* content) { - if (!content || !content->IsType(Value::TYPE_LIST)) { + if (!content || !content->IsType(Value::TYPE_LIST)) { NOTREACHED(); return std::string(); } @@ -142,6 +143,29 @@ void SyncSetupFlow::OnDialogClosed(const std::string& json_retval) { prefs->SetBoolean(prefs::kSyncHasSetupCompleted, true); prefs->ScheduleSavePersistentPrefs(); } + + // Record the state at which the user cancelled the signon dialog. + switch (current_state_) { + case SyncSetupWizard::GAIA_LOGIN: + ProfileSyncService::SyncEvent( + ProfileSyncService::CANCEL_FROM_SIGNON_WIHTOUT_AUTH); + break; + case SyncSetupWizard::GAIA_SUCCESS: + ProfileSyncService::SyncEvent( + ProfileSyncService::CANCEL_DURING_SIGNON); + break; + case SyncSetupWizard::MERGE_AND_SYNC: + ProfileSyncService::SyncEvent( + ProfileSyncService::CANCEL_DURING_SIGNON_AFTER_MERGE); + break; + case SyncSetupWizard::DONE: + UMA_HISTOGRAM_MEDIUM_TIMES("Sync.UserPerceivedAuthorizationTime", + base::TimeTicks::Now() - login_start_time_); + break; + default: + break; + } + service_->OnUserCancelledDialog(); delete this; } @@ -213,7 +237,6 @@ void SyncSetupFlow::Advance(SyncSetupWizard::State advance_state) { current_state_ = advance_state; } - // static SyncSetupFlow* SyncSetupFlow::Run(ProfileSyncService* service, SyncSetupFlowContainer* container, diff --git a/chrome/browser/views/sync/sync_setup_flow.h b/chrome/browser/views/sync/sync_setup_flow.h index ff86f7b..6412a74 100644 --- a/chrome/browser/views/sync/sync_setup_flow.h +++ b/chrome/browser/views/sync/sync_setup_flow.h @@ -10,6 +10,7 @@ #include <string> #include <vector> +#include "base/time.h" #include "chrome/browser/dom_ui/html_dialog_ui.h" #include "chrome/browser/sync/personalization_strings.h" #include "chrome/browser/views/sync/sync_setup_wizard.h" @@ -96,9 +97,13 @@ class SyncSetupFlow : public HtmlDialogUIDelegate { SyncSetupWizard::State end_state, const std::string& args, SyncSetupFlowContainer* container, FlowHandler* handler, ProfileSyncService* service) - : container_(container), dialog_start_args_(args), - current_state_(start_state), end_state_(end_state), - flow_handler_(handler), service_(service) { + : container_(container), + dialog_start_args_(args), + current_state_(start_state), + end_state_(end_state), + login_start_time_(base::TimeTicks::Now()), + flow_handler_(handler), + service_(service) { } // Returns true if |this| should transition its state machine to |state| @@ -112,6 +117,9 @@ class SyncSetupFlow : public HtmlDialogUIDelegate { SyncSetupWizard::State current_state_; SyncSetupWizard::State end_state_; // The goal. + // Time that the GAIA_LOGIN step was received. + base::TimeTicks login_start_time_; + // The handler needed for the entire flow. We don't own this. FlowHandler* flow_handler_; |