diff options
author | kerz@chromium.org <kerz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-13 23:33:08 +0000 |
---|---|---|
committer | kerz@chromium.org <kerz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-13 23:33:08 +0000 |
commit | 58be70d70b3685fceb477afc5915171e6cc874da (patch) | |
tree | e7f21be58b38e179885fb89898784a7427e848a8 | |
parent | 8657a412879c6a030083b552608e043b6b413db3 (diff) | |
download | chromium_src-58be70d70b3685fceb477afc5915171e6cc874da.zip chromium_src-58be70d70b3685fceb477afc5915171e6cc874da.tar.gz chromium_src-58be70d70b3685fceb477afc5915171e6cc874da.tar.bz2 |
Merge 215935 "Only submit HomePageIsNewTabPage metric when ShowH..."
> Only submit HomePageIsNewTabPage metric when ShowHomeButton is enabled
>
> This is a rebased version of https://chromiumcodereview.appspot.com/20722007 which was reverted due to a reverted branch dependency.
>
> BUG=266902
>
> Review URL: https://chromiumcodereview.appspot.com/21690005
TBR=rockot@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/branches/1547/src@217379 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/prefs/pref_metrics_service.cc | 17 | ||||
-rw-r--r-- | tools/metrics/histograms/histograms.xml | 14 |
2 files changed, 21 insertions, 10 deletions
diff --git a/chrome/browser/prefs/pref_metrics_service.cc b/chrome/browser/prefs/pref_metrics_service.cc index 78f4873..c0d5afb 100644 --- a/chrome/browser/prefs/pref_metrics_service.cc +++ b/chrome/browser/prefs/pref_metrics_service.cc @@ -100,19 +100,18 @@ PrefMetricsService::~PrefMetricsService() { void PrefMetricsService::RecordLaunchPrefs() { PrefService* prefs = profile_->GetPrefs(); - const bool show_home_button = prefs->GetBoolean(prefs::kShowHomeButton); - const bool home_page_is_ntp = prefs->GetBoolean(prefs::kHomePageIsNewTabPage); - + bool show_home_button = prefs->GetBoolean(prefs::kShowHomeButton); + bool home_page_is_ntp = prefs->GetBoolean(prefs::kHomePageIsNewTabPage); UMA_HISTOGRAM_BOOLEAN("Settings.ShowHomeButton", show_home_button); - if (show_home_button) - UMA_HISTOGRAM_BOOLEAN("Settings.HomePageIsNewTabPage", home_page_is_ntp); - - int restore_on_startup = profile_->GetPrefs()->GetInteger( - prefs::kRestoreOnStartup); + if (show_home_button) { + UMA_HISTOGRAM_BOOLEAN("Settings.GivenShowHomeButton_HomePageIsNewTabPage", + home_page_is_ntp); + } + int restore_on_startup = prefs->GetInteger(prefs::kRestoreOnStartup); UMA_HISTOGRAM_ENUMERATION("Settings.StartupPageLoadSettings", restore_on_startup, SessionStartupPref::kPrefValueMax); if (restore_on_startup == SessionStartupPref::kPrefValueURLs) { - const int url_list_size = profile_->GetPrefs()->GetList( + const int url_list_size = prefs->GetList( prefs::kURLsToRestoreOnStartup)->GetSize(); UMA_HISTOGRAM_CUSTOM_COUNTS( "Settings.StartupPageLoadURLs", url_list_size, 1, 50, 20); diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 221ae08..536f6d7 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml @@ -10874,6 +10874,14 @@ other types of suffix sets. </summary> </histogram> +<histogram name="Settings.GivenShowHomeButton_HomePageIsNewTabPage" + enum="Boolean"> + <summary> + Whether or not the home page user preference is set to the default NTP value + when a profile is loaded. This is only logged if the home button is shown. + </summary> +</histogram> + <histogram name="Settings.HomePageDomain" enum="OmniboxSearchEngine"> <summary> The id of the home page domain that is specified in user preferences when a @@ -10882,6 +10890,10 @@ other types of suffix sets. </histogram> <histogram name="Settings.HomePageIsNewTabPage" enum="Boolean"> + <obsolete> + Deprecated 08/05/2013. Replaced by + Settings.GivenShowHomeButton_HomePageIsNewTabPage. + </obsolete> <summary> Whether or not the home page user preference is set to the default NTP value when a profile is loaded. This is only logged if the Home button is enabled. @@ -10890,7 +10902,7 @@ other types of suffix sets. <histogram name="Settings.ShowHomeButton" enum="BooleanEnabled"> <summary> - Whether or not the Home button is enabled in user preferences when a profile + Whether or not the home button is enabled in user preferences when a profile is loaded. </summary> </histogram> |