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

Unified Diff: chrome/browser/prefs/pref_metrics_service.cc

Issue 21130008: Merge 214426 "Add histograms for session startup enum and number..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1547/src/
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/prefs/session_startup_pref.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_metrics_service.cc
===================================================================
--- chrome/browser/prefs/pref_metrics_service.cc (revision 214491)
+++ chrome/browser/prefs/pref_metrics_service.cc (working copy)
@@ -6,6 +6,7 @@
#include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h"
+#include "chrome/browser/prefs/session_startup_pref.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
@@ -24,6 +25,17 @@
profile_->GetPrefs()->GetBoolean(prefs::kShowHomeButton));
UMA_HISTOGRAM_BOOLEAN("Settings.HomePageIsNewTabPage",
profile_->GetPrefs()->GetBoolean(prefs::kHomePageIsNewTabPage));
+
+ int restore_on_startup = profile_->GetPrefs()->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(
+ prefs::kURLsToRestoreOnStartup)->GetSize();
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Settings.StartupPageLoadURLs", url_list_size, 1, 50, 20);
+ }
}
// static
« no previous file with comments | « no previous file | chrome/browser/prefs/session_startup_pref.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698