diff options
author | pmonette <pmonette@chromium.org> | 2015-11-19 12:29:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-19 20:30:26 +0000 |
commit | 9c1457fa00495c86d6b3017c7b5d1311ac0c2e2f (patch) | |
tree | 01aa655e6460ca5cdbebfcda5894ff7808a3fb02 | |
parent | 354c7c01fde29a5b7200403c2a730da6515f5b88 (diff) | |
download | chromium_src-9c1457fa00495c86d6b3017c7b5d1311ac0c2e2f.zip chromium_src-9c1457fa00495c86d6b3017c7b5d1311ac0c2e2f.tar.gz chromium_src-9c1457fa00495c86d6b3017c7b5d1311ac0c2e2f.tar.bz2 |
Make the histograms for setting the default browser consistent
BUG=
Review URL: https://codereview.chromium.org/1426663005
Cr-Commit-Position: refs/heads/master@{#360654}
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | chrome/browser/shell_integration.cc | 132 | ||||
-rw-r--r-- | chrome/browser/shell_integration.h | 31 | ||||
-rw-r--r-- | chrome/browser/shell_integration_win.cc | 6 | ||||
-rw-r--r-- | chrome/browser/ui/browser_command_controller.cc | 3 | ||||
-rw-r--r-- | chrome/browser/ui/startup/default_browser_prompt.cc | 97 | ||||
-rw-r--r-- | chrome/browser/ui/webui/options/browser_options_handler.cc | 4 | ||||
-rw-r--r-- | tools/metrics/actions/actions.xml | 21 | ||||
-rw-r--r-- | tools/metrics/histograms/histograms.xml | 112 |
9 files changed, 276 insertions, 131 deletions
@@ -434,6 +434,7 @@ v8.log /tools/gyp /tools/histograms /tools/json_schema_compiler/test/json_schema_compiler_tests.xml +/tools/metrics/actions/actions.old.xml /tools/metrics/histograms/histograms.before.pretty-print.xml /tools/page_cycler/acid3 /tools/perf/data diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc index d8c5b8d..c1f8346 100644 --- a/chrome/browser/shell_integration.cc +++ b/chrome/browser/shell_integration.cc @@ -10,6 +10,7 @@ #include "base/metrics/histogram_macros.h" #include "base/prefs/pref_service.h" #include "base/strings/string_util.h" +#include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_restrictions.h" #include "base/timer/timer.h" @@ -176,12 +177,12 @@ ShellIntegration::DefaultWebClientWorker::DefaultWebClientWorker( : observer_(observer) {} void ShellIntegration::DefaultWebClientWorker::StartCheckIsDefault() { - if (observer_) { + if (observer_) observer_->SetDefaultWebClientUIState(STATE_PROCESSING); - BrowserThread::PostTask( - BrowserThread::FILE, FROM_HERE, - base::Bind(&DefaultWebClientWorker::CheckIsDefault, this)); - } + + BrowserThread::PostTask( + BrowserThread::FILE, FROM_HERE, + base::Bind(&DefaultWebClientWorker::CheckIsDefault, this)); } void ShellIntegration::DefaultWebClientWorker::StartSetAsDefault() { @@ -196,15 +197,14 @@ void ShellIntegration::DefaultWebClientWorker::StartSetAsDefault() { } set_as_default_in_progress_ = true; - bool interactive_permitted = false; + bool interactive_permitted = true; if (observer_) { observer_->SetDefaultWebClientUIState(STATE_PROCESSING); interactive_permitted = observer_->IsInteractiveSetDefaultPermitted(); - - // The initialization is only useful when there is an observer. - set_as_default_initialized_ = InitializeSetAsDefault(); } + set_as_default_initialized_ = InitializeSetAsDefault(); + // Remember the start time. start_time_ = base::TimeTicks::Now(); @@ -237,6 +237,15 @@ void ShellIntegration::DefaultWebClientWorker::OnCheckIsDefaultComplete( DefaultWebClientState state) { DCHECK_CURRENTLY_ON(BrowserThread::UI); UpdateUI(state); + + if (check_default_should_report_success_) { + check_default_should_report_success_ = false; + + ReportAttemptResult(state == DefaultWebClientState::IS_DEFAULT + ? AttemptResult::SUCCESS + : AttemptResult::NO_ERRORS_NOT_DEFAULT); + } + // The worker has finished everything it needs to do, so free the observer // if we own it. if (observer_ && observer_->IsOwnedByWorker()) { @@ -250,7 +259,7 @@ void ShellIntegration::DefaultWebClientWorker::OnSetAsDefaultAttemptComplete( DCHECK_CURRENTLY_ON(BrowserThread::UI); // Hold on to a reference because if this was called via the default browser // callback in StartupBrowserCreator, clearing the callback in - // FinalizeSetAsDefault would otherwise remove the last reference and delete + // FinalizeSetAsDefault() would otherwise remove the last reference and delete // us in the middle of this function. scoped_refptr<DefaultWebClientWorker> scoped_ref(this); @@ -267,7 +276,11 @@ void ShellIntegration::DefaultWebClientWorker::OnSetAsDefaultAttemptComplete( observer_->OnSetAsDefaultConcluded(succeeded); } - ReportAttemptResult(result); + // Report failures here. Successes are reported in + // OnCheckIsDefaultComplete() after checking that the change is verified. + check_default_should_report_success_ = result == AttemptResult::SUCCESS; + if (!check_default_should_report_success_) + ReportAttemptResult(result); // Start the default browser check which will notify the observer as to // whether Chrome is really the default browser. This is needed because @@ -280,35 +293,24 @@ void ShellIntegration::DefaultWebClientWorker::OnSetAsDefaultAttemptComplete( void ShellIntegration::DefaultWebClientWorker::ReportAttemptResult( AttemptResult result) { - if (!ShouldReportAttemptResults()) - return; - - UMA_HISTOGRAM_ENUMERATION("DefaultBrowser.AsyncSetAsDefault.Result", result, - AttemptResult::NUM_ATTEMPT_RESULT_TYPES); - - switch (result) { - case SUCCESS: - UMA_HISTOGRAM_MEDIUM_TIMES( - "DefaultBrowser.AsyncSetAsDefault.Duration_Success", - base::TimeTicks::Now() - start_time_); - break; - case FAILURE: - UMA_HISTOGRAM_MEDIUM_TIMES( - "DefaultBrowser.AsyncSetAsDefault.Duration_Failure", - base::TimeTicks::Now() - start_time_); - break; - case ABANDONED: - UMA_HISTOGRAM_MEDIUM_TIMES( - "DefaultBrowser.AsyncSetAsDefault.Duration_Abandoned", - base::TimeTicks::Now() - start_time_); - break; - case RETRY: - UMA_HISTOGRAM_MEDIUM_TIMES( - "DefaultBrowser.AsyncSetAsDefault.Duration_Retry", - base::TimeTicks::Now() - start_time_); - break; - default: - break; + const char* histogram_prefix = GetHistogramPrefix(); + + // Report result. + base::LinearHistogram::FactoryGet( + base::StringPrintf("%s.SetDefaultResult", histogram_prefix), 1, + AttemptResult::NUM_ATTEMPT_RESULT_TYPES, + AttemptResult::NUM_ATTEMPT_RESULT_TYPES + 1, + base::HistogramBase::kUmaTargetedHistogramFlag) + ->Add(result); + + // Report asynchronous duration. + if (IsSetAsDefaultAsynchronous() && ShouldReportDurationForResult(result)) { + base::Histogram::FactoryTimeGet( + base::StringPrintf("%s.SetDefaultAsyncDuration_%s", histogram_prefix, + AttemptResultToString(result)), + base::TimeDelta::FromMilliseconds(10), base::TimeDelta::FromMinutes(3), + 50, base::HistogramBase::kUmaTargetedHistogramFlag) + ->AddTime(base::TimeTicks::Now() - start_time_); } } @@ -318,13 +320,6 @@ bool ShellIntegration::DefaultWebClientWorker::InitializeSetAsDefault() { void ShellIntegration::DefaultWebClientWorker::FinalizeSetAsDefault() {} -#if !defined(OS_WIN) -// static -bool ShellIntegration::DefaultWebClientWorker::ShouldReportAttemptResults() { - return false; -} -#endif // !defined(OS_WIN) - void ShellIntegration::DefaultWebClientWorker::UpdateUI( DefaultWebClientState state) { if (observer_) { @@ -344,6 +339,40 @@ void ShellIntegration::DefaultWebClientWorker::UpdateUI( } } +// static +bool ShellIntegration::DefaultWebClientWorker::ShouldReportDurationForResult( + AttemptResult result) { + return result == SUCCESS || result == FAILURE || result == ABANDONED || + result == RETRY; +} + +// static +const char* ShellIntegration::DefaultWebClientWorker::AttemptResultToString( + AttemptResult result) { + switch (result) { + case SUCCESS: + return "Success"; + case ALREADY_DEFAULT: + return "AlreadyDefault"; + case FAILURE: + return "Failure"; + case ABANDONED: + return "Abandoned"; + case LAUNCH_FAILURE: + return "LaunchFailure"; + case OTHER_WORKER: + return "OtherWorker"; + case RETRY: + return "Retry"; + case NO_ERRORS_NOT_DEFAULT: + return "NoErrorsNotDefault"; + case NUM_ATTEMPT_RESULT_TYPES: + break; + } + NOTREACHED(); + return ""; +} + /////////////////////////////////////////////////////////////////////////////// // ShellIntegration::DefaultBrowserWorker // @@ -408,6 +437,10 @@ void ShellIntegration::DefaultBrowserWorker::SetAsDefault( result)); } +const char* ShellIntegration::DefaultBrowserWorker::GetHistogramPrefix() { + return "DefaultBrowser"; +} + /////////////////////////////////////////////////////////////////////////////// // ShellIntegration::DefaultProtocolClientWorker // @@ -457,3 +490,8 @@ void ShellIntegration::DefaultProtocolClientWorker::SetAsDefault( base::Bind(&DefaultProtocolClientWorker::OnSetAsDefaultAttemptComplete, this, result)); } + +const char* +ShellIntegration::DefaultProtocolClientWorker::GetHistogramPrefix() { + return "DefaultProtocolClient"; +} diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h index 914a08b..39d477c 100644 --- a/chrome/browser/shell_integration.h +++ b/chrome/browser/shell_integration.h @@ -239,7 +239,7 @@ class ShellIntegration { // Possible result codes for a set-as-default operation. // Do not modify the ordering as it is important for UMA. enum AttemptResult { - // No errors encountered. + // Chrome was set as the default web client. SUCCESS, // Chrome was already the default web client. This counts as a successful // attempt. @@ -257,6 +257,9 @@ class ShellIntegration { // The user initiated another attempt while the asynchronous operation was // already in progress. RETRY, + // No errors were encountered yet Chrome is still not the default web + // client. + NO_ERRORS_NOT_DEFAULT, NUM_ATTEMPT_RESULT_TYPES }; @@ -295,6 +298,10 @@ class ShellIntegration { // OnSetAsDefaultAttemptComplete() on the UI thread. virtual void SetAsDefault(bool interactive_permitted) = 0; + // Returns the prefix used for metrics to differentiate UMA metrics for + // setting the default browser and setting the default protocol client. + virtual const char* GetHistogramPrefix() = 0; + // Invoked on the UI thread prior to starting a set-as-default operation. // Returns true if the initialization succeeded and a subsequent call to // FinalizeSetAsDefault() is required. @@ -303,9 +310,6 @@ class ShellIntegration { // Invoked on the UI thread following a set-as-default operation. virtual void FinalizeSetAsDefault(); - // Returns true if the attempt results should be reported to UMA. - static bool ShouldReportAttemptResults(); - // Reports the result and duration for one set-as-default attempt. void ReportAttemptResult(AttemptResult result); @@ -313,6 +317,13 @@ class ShellIntegration { // client state. void UpdateUI(DefaultWebClientState state); + // Returns true if the duration of an attempt to set the default web client + // should be reported to UMA for |result|. + static bool ShouldReportDurationForResult(AttemptResult result); + + // Returns a string based on |result|. This is used for UMA reports. + static const char* AttemptResultToString(AttemptResult result); + DefaultWebClientObserver* observer_; // Flag that indicates the return value of InitializeSetAsDefault(). If @@ -323,6 +334,10 @@ class ShellIntegration { // Records the time it takes to set the default browser. base::TimeTicks start_time_; + // Wait until Chrome has been confirmed as the default browser before + // reporting a successful attempt. + bool check_default_should_report_success_ = false; + DISALLOW_COPY_AND_ASSIGN(DefaultWebClientWorker); }; @@ -340,6 +355,9 @@ class ShellIntegration { // Set Chrome as the default browser. void SetAsDefault(bool interactive_permitted) override; + // Returns the histogram prefix for DefaultBrowserWorker. + const char* GetHistogramPrefix() override; + #if defined(OS_WIN) // On Windows 10+, adds the default browser callback and starts the timer // that determines if the operation was successful or not. @@ -355,7 +373,7 @@ class ShellIntegration { // Used to determine if setting the default browser was unsuccesful. scoped_ptr<base::OneShotTimer> async_timer_; -#endif // !defined(OS_WIN) +#endif // defined(OS_WIN) DISALLOW_COPY_AND_ASSIGN(DefaultBrowserWorker); }; @@ -381,6 +399,9 @@ class ShellIntegration { // Set Chrome as the default handler for this protocol. void SetAsDefault(bool interactive_permitted) override; + // Returns the histogram prefix for DefaultProtocolClientWorker. + const char* GetHistogramPrefix() override; + std::string protocol_; DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc index ff5423f..d23682b 100644 --- a/chrome/browser/shell_integration_win.cc +++ b/chrome/browser/shell_integration_win.cc @@ -642,12 +642,6 @@ base::FilePath ShellIntegration::GetStartMenuShortcut( return base::FilePath(); } -// static -bool ShellIntegration::DefaultWebClientWorker::ShouldReportAttemptResults() { - return base::win::GetVersion() >= base::win::VERSION_WIN10 && - IsSetAsDefaultAsynchronous(); -} - bool ShellIntegration::DefaultBrowserWorker::InitializeSetAsDefault() { DCHECK_CURRENTLY_ON(BrowserThread::UI); diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc index ad8f0ca..b6f7942 100644 --- a/chrome/browser/ui/browser_command_controller.cc +++ b/chrome/browser/ui/browser_command_controller.cc @@ -4,6 +4,8 @@ #include "chrome/browser/ui/browser_command_controller.h" +#include <string> + #include "base/command_line.h" #include "base/prefs/pref_service.h" #include "chrome/app/chrome_command_ids.h" @@ -165,7 +167,6 @@ class SwitchToMetroUIHandler return; } first_check_ = false; - default_browser_worker_->StartCheckIsDefault(); } bool IsInteractiveSetDefaultPermitted() override { diff --git a/chrome/browser/ui/startup/default_browser_prompt.cc b/chrome/browser/ui/startup/default_browser_prompt.cc index d1c9143..9f15d94d 100644 --- a/chrome/browser/ui/startup/default_browser_prompt.cc +++ b/chrome/browser/ui/startup/default_browser_prompt.cc @@ -9,6 +9,7 @@ #include "base/location.h" #include "base/memory/weak_ptr.h" #include "base/metrics/histogram_macros.h" +#include "base/metrics/user_metrics_action.h" #include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_service.h" #include "base/single_thread_task_runner.h" @@ -18,7 +19,6 @@ #include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" -#include "chrome/browser/shell_integration.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" @@ -29,6 +29,7 @@ #include "components/infobars/core/infobar.h" #include "components/version_info/version_info.h" #include "content/public/browser/navigation_details.h" +#include "content/public/browser/user_metrics.h" #include "content/public/browser/web_contents.h" #include "grit/theme_resources.h" #include "ui/base/l10n/l10n_util.h" @@ -36,71 +37,6 @@ namespace { -// A ShellIntegration::DefaultWebClientObserver that records user metrics for -// the result of making Chrome the default browser. -class SetDefaultBrowserObserver - : public ShellIntegration::DefaultWebClientObserver { - public: - SetDefaultBrowserObserver(); - ~SetDefaultBrowserObserver() override; - - private: - void SetDefaultWebClientUIState( - ShellIntegration::DefaultWebClientUIState state) override; - void OnSetAsDefaultConcluded(bool succeeded) override; - bool IsOwnedByWorker() override; - bool IsInteractiveSetDefaultPermitted() override; - - // True if an interactive flow will be used (i.e., Windows 8+). - bool interactive_; - - // The result of the call to ShellIntegration::SetAsDefaultBrowser() or - // ShellIntegration::SetAsDefaultBrowserInteractive(). - bool interaction_succeeded_ = false; - - DISALLOW_COPY_AND_ASSIGN(SetDefaultBrowserObserver); -}; - -SetDefaultBrowserObserver::SetDefaultBrowserObserver() - : interactive_(ShellIntegration::CanSetAsDefaultBrowser() == - ShellIntegration::SET_DEFAULT_INTERACTIVE) { - // Log that an attempt is about to be made to set one way or the other. - if (interactive_) - UMA_HISTOGRAM_BOOLEAN("DefaultBrowserWarning.SetAsDefaultUI", true); - else - UMA_HISTOGRAM_BOOLEAN("DefaultBrowserWarning.SetAsDefault", true); -} - -SetDefaultBrowserObserver::~SetDefaultBrowserObserver() {} - -void SetDefaultBrowserObserver::SetDefaultWebClientUIState( - ShellIntegration::DefaultWebClientUIState state) { - if (interactive_ && interaction_succeeded_ && - state == ShellIntegration::STATE_NOT_DEFAULT) { - // The interactive flow succeeded, yet Chrome is not the default browser. - // This likely means that the user selected another browser from the panel. - // Consider this the same as canceling the infobar. - UMA_HISTOGRAM_BOOLEAN("DefaultBrowserWarning.DontSetAsDefault", true); - } -} - -void SetDefaultBrowserObserver::OnSetAsDefaultConcluded(bool succeeded) { - interaction_succeeded_ = succeeded; - if (interactive_ && !succeeded) { - // Log that the interactive flow failed. - UMA_HISTOGRAM_BOOLEAN("DefaultBrowserWarning.SetAsDefaultUIFailed", true); - } -} - -bool SetDefaultBrowserObserver::IsOwnedByWorker() { - // Instruct the DefaultBrowserWorker to delete this instance when it is done. - return true; -} - -bool SetDefaultBrowserObserver::IsInteractiveSetDefaultPermitted() { - return true; -} - // The delegate for the infobar shown when Chrome is not the default browser. class DefaultBrowserInfoBarDelegate : public ConfirmInfoBarDelegate { public: @@ -109,6 +45,18 @@ class DefaultBrowserInfoBarDelegate : public ConfirmInfoBarDelegate { static void Create(InfoBarService* infobar_service, PrefService* prefs); private: + // Possible user interactions with the default browser info bar. + // Do not modify the ordering as it is important for UMA. + enum InfoBarUserInteraction { + // The user clicked the "Set as default" button. + START_SET_AS_DEFAULT, + // The user doesn't want to be reminded again. + DONT_ASK_AGAIN, + // The user did not interact with the info bar. + IGNORE_INFO_BAR, + NUM_INFO_BAR_USER_INTERACTION_TYPES + }; + explicit DefaultBrowserInfoBarDelegate(PrefService* prefs); ~DefaultBrowserInfoBarDelegate() override; @@ -164,7 +112,9 @@ DefaultBrowserInfoBarDelegate::DefaultBrowserInfoBarDelegate(PrefService* prefs) DefaultBrowserInfoBarDelegate::~DefaultBrowserInfoBarDelegate() { if (!action_taken_) - UMA_HISTOGRAM_BOOLEAN("DefaultBrowserWarning.Ignored", true); + UMA_HISTOGRAM_ENUMERATION("DefaultBrowser.InfoBar.UserInteraction", + InfoBarUserInteraction::IGNORE_INFO_BAR, + NUM_INFO_BAR_USER_INTERACTION_TYPES); } infobars::InfoBarDelegate::Type DefaultBrowserInfoBarDelegate::GetInfoBarType() @@ -213,15 +163,24 @@ bool DefaultBrowserInfoBarDelegate::OKButtonTriggersUACPrompt() const { bool DefaultBrowserInfoBarDelegate::Accept() { action_taken_ = true; + content::RecordAction( + base::UserMetricsAction("DefaultBrowserInfoBar_Accept")); + UMA_HISTOGRAM_ENUMERATION("DefaultBrowser.InfoBar.UserInteraction", + InfoBarUserInteraction::START_SET_AS_DEFAULT, + NUM_INFO_BAR_USER_INTERACTION_TYPES); scoped_refptr<ShellIntegration::DefaultBrowserWorker>( - new ShellIntegration::DefaultBrowserWorker(new SetDefaultBrowserObserver)) + new ShellIntegration::DefaultBrowserWorker(nullptr)) ->StartSetAsDefault(); return true; } bool DefaultBrowserInfoBarDelegate::Cancel() { action_taken_ = true; - UMA_HISTOGRAM_BOOLEAN("DefaultBrowserWarning.DontSetAsDefault", true); + content::RecordAction( + base::UserMetricsAction("DefaultBrowserInfoBar_DontAskAgain")); + UMA_HISTOGRAM_ENUMERATION("DefaultBrowser.InfoBar.UserInteraction", + InfoBarUserInteraction::DONT_ASK_AGAIN, + NUM_INFO_BAR_USER_INTERACTION_TYPES); // User clicked "Don't ask me again", remember that. prefs_->SetBoolean(prefs::kCheckDefaultBrowser, false); return true; diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc index 095cb14..b8159eb 100644 --- a/chrome/browser/ui/webui/options/browser_options_handler.cc +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc @@ -1083,8 +1083,10 @@ void BrowserOptionsHandler::BecomeDefaultBrowser(const base::ListValue* args) { return; content::RecordAction(UserMetricsAction("Options_SetAsDefaultBrowser")); - default_browser_worker_->StartSetAsDefault(); + UMA_HISTOGRAM_COUNTS("Settings.StartSetAsDefault", true); + // Callback takes care of updating UI. + default_browser_worker_->StartSetAsDefault(); // If the user attempted to make Chrome the default browser, notify // them when this changes. diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml index 8837add..5a9a7e0 100644 --- a/tools/metrics/actions/actions.xml +++ b/tools/metrics/actions/actions.xml @@ -2589,6 +2589,20 @@ should be able to be added at any place in this file. <description>Please enter the description of this user action.</description> </action> +<action name="DefaultBrowserInfoBar_Accept"> + <owner>pmonette@chromium.org</owner> + <description> + The user clicked "Set as default" on the info bar. + </description> +</action> + +<action name="DefaultBrowserInfoBar_DontAskAgain"> + <owner>pmonette@chromium.org</owner> + <description> + The user clicked "Don't ask again" on the info bar. + </description> +</action> + <action name="Delete"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description> @@ -10270,8 +10284,11 @@ should be able to be added at any place in this file. </action> <action name="Options_SetAsDefaultBrowser"> - <owner>Please list the metric's owners. Add more owner tags as needed.</owner> - <description>Please enter the description of this user action.</description> + <owner>pmonette@chromium.org</owner> + <description> + The user clicked "Make Chrome the default browser" in the settings + page. + </description> </action> <action name="Options_SetDownloadDirectory"> diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 4132996..4b4fd28 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml @@ -6567,6 +6567,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. <histogram name="DefaultBrowser.AsyncSetAsDefault.Duration" units="milliseconds"> + <obsolete> + Deprecated 2015/11. Renamed to DefaultBrowser.SetDefaultAsyncDuration. + </obsolete> <owner>pmonette@chromium.org</owner> <summary> How long it took to set Chrome as the default browser asynchronously in @@ -6577,6 +6580,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. <histogram name="DefaultBrowser.AsyncSetAsDefault.Result" enum="DefaultBrowserAsyncAttemptResult"> + <obsolete> + Deprecated 2015/11. Renamed to DefaultBrowser.SetDefaultResult. + </obsolete> <owner>pmonette@chromium.org</owner> <summary> The count of how many times users were successfully able to set Chrome as @@ -6584,6 +6590,14 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. </summary> </histogram> +<histogram name="DefaultBrowser.InfoBar.UserInteraction" + enum="DefaultBrowserInfoBarUserInteraction"> + <owner>pmonette@chromium.org</owner> + <summary> + Possible user interactions with the default browser info bar. + </summary> +</histogram> + <histogram name="DefaultBrowser.InteractionResult" enum="MakeChromeDefaultResult"> <owner>gab@chromium.org</owner> @@ -6592,12 +6606,33 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. </summary> </histogram> +<histogram name="DefaultBrowser.SetDefaultAsyncDuration" units="milliseconds"> + <owner>pmonette@chromium.org</owner> + <summary> + How long it took to set Chrome as the default browser asynchronously in + Windows 10+. The duration is recorded only on Success, Failure, Abandoned, + Retry and NoErrorsNotDefault result codes. + </summary> +</histogram> + +<histogram name="DefaultBrowser.SetDefaultResult" + enum="SetDefaultAttemptResult"> + <owner>pmonette@chromium.org</owner> + <summary> + The outcome of an attempt to set Chrome as the user's default browser. + </summary> +</histogram> + <histogram name="DefaultBrowser.State" enum="DefaultBrowserState"> <owner>gab@chromium.org</owner> <summary>Whether Chrome was the default browser when it started up.</summary> </histogram> <histogram name="DefaultBrowserWarning.DontSetAsDefault" enum="BooleanHit"> + <obsolete> + Deprecated 2015/11. The same information is available as the value Failure + in DefaultBrowser.SetDefaultResult. + </obsolete> <owner>gab@chromium.org</owner> <summary> In the make-default infobar, the user explicitly declined to set Chrome as @@ -6608,6 +6643,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. </histogram> <histogram name="DefaultBrowserWarning.Ignored" enum="BooleanHit"> + <obsolete> + Deprecated 2015/11. Renamed to DefaultBrowser.InfoBar.UserInteraction. + </obsolete> <owner>gab@chromium.org</owner> <summary> The user ignored the make-default infobar (it was eventually dismissed along @@ -6616,6 +6654,10 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. </histogram> <histogram name="DefaultBrowserWarning.SetAsDefault" enum="BooleanHit"> + <obsolete> + Deprecated 2015/11. Renamed to DefaultBrowser.Infobar.UserInteraction. There + is no longer a distinction between interactive or not. + </obsolete> <owner>gab@chromium.org</owner> <summary> In the make-default infobar, the user clicked a button making Chrome the @@ -6624,6 +6666,10 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. </histogram> <histogram name="DefaultBrowserWarning.SetAsDefaultUI" enum="BooleanHit"> + <obsolete> + Deprecated 2015/11. Renamed to DefaultBrowser.Infobar.UserInteraction. There + is no longer a distinction between interactive or not. + </obsolete> <owner>gab@chromium.org</owner> <summary> Same as SetAsDefault, but in Win8+ (resulting in interactive UI instead of @@ -6634,6 +6680,10 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. </histogram> <histogram name="DefaultBrowserWarning.SetAsDefaultUIFailed" enum="BooleanHit"> + <obsolete> + Deprecated 2015/11. The same information is available as the value Failure + in DefaultBrowser.SetDefaultResult. + </obsolete> <owner>gab@chromium.org</owner> <summary> The user dismissed the interactive SetAsDefaultUI without making an explicit @@ -6641,6 +6691,15 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. </summary> </histogram> +<histogram name="DefaultProtocolClient.SetDefaultResult" + enum="SetDefaultAttemptResult"> + <owner>pmonette@chromium.org</owner> + <summary> + The outcome of an attempt to set Chrome as the user's default client for a + protocol. + </summary> +</histogram> + <histogram name="DevTools.ActionTaken" enum="DevToolsAction"> <owner>sergeyv@chromium.org</owner> <owner>vsevik@chromium.org</owner> @@ -42909,6 +42968,14 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. </summary> </histogram> +<histogram name="Settings.StartSetAsDefault" enum="BooleanHit"> + <owner>pmonette@chromium.org</owner> + <summary> + The user clicked "Make Google Chrome the default browser" on the + settings page. + </summary> +</histogram> + <histogram name="Settings.StartupPageDomains" enum="OmniboxSearchEngine"> <obsolete> Deprecated in Chrome 30. Replaced by Settings.StartupPageEngineTypes. @@ -57059,6 +57126,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. </enum> <enum name="DefaultBrowserAsyncAttemptResult" type="int"> + <obsolete> + Deprecated 2015/11. Renamed to SetDefaultAttemptResult. + </obsolete> <int value="0" label="Success">No errors encountered.</int> <int value="1" label="Already default"> Chrome was already the default web client. This counts as a successful @@ -57083,6 +57153,18 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. </int> </enum> +<enum name="DefaultBrowserInfoBarUserInteraction" type="int"> + <int value="0" label="Start set as default"> + The user clicked the "Set as default" button. + </int> + <int value="1" label="Don't ask again"> + The user doesn't want to be reminded again. + </int> + <int value="2" label="Ignore info bar"> + The user did not interact with the info bar. + </int> +</enum> + <enum name="DefaultBrowserState" type="int"> <int value="0" label="Not Default"/> <int value="1" label="Default"/> @@ -73634,6 +73716,34 @@ To add a new entry, add it with any value and run test to compute valid value. </int> </enum> +<enum name="SetDefaultAttemptResult" type="int"> + <int value="0" label="Success">Chrome was set as the default web client.</int> + <int value="1" label="Already default"> + Chrome was already the default web client. This counts as a successful + attempt. + </int> + <int value="2" label="Failure"> + Chrome was not set as the default web client. + </int> + <int value="3" label="Abandoned"> + The attempt was abandoned because the observer was destroyed. + </int> + <int value="4" label="Launch failure"> + Failed to launch the process to set Chrome as the default web client + asynchronously. + </int> + <int value="5" label="Other worker"> + Another worker is already in progress to make Chrome the default web client. + </int> + <int value="6" label="Retry"> + The user initiated another attempt while the asynchronous operation was + already in progress. + </int> + <int value="7" label="No errors, not default"> + No errors were encountered yet Chrome is still not the default web client. + </int> +</enum> + <enum name="SHA1Status" type="int"> <summary> Whether or not SHA-1 was present in a certificate chain and, if it was, when @@ -77464,7 +77574,9 @@ To add a new entry, add it with any value and run test to compute valid value. <suffix name="Failure"/> <suffix name="Abandoned"/> <suffix name="Retry"/> + <suffix name="NoErrorsNotDefault"/> <affected-histogram name="DefaultBrowser.AsyncSetAsDefault.Duration"/> + <affected-histogram name="DefaultBrowser.SetDefaultAsyncDuration"/> </histogram_suffixes> <histogram_suffixes name="AutofillDataAvailability" separator="."> |