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

Unified Diff: chrome/browser/profiles/profile_metrics.cc

Issue 8890054: Adding metrics to track browser launches per primary/secondary profile. Adding metrics to track n... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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
Index: chrome/browser/profiles/profile_metrics.cc
===================================================================
--- chrome/browser/profiles/profile_metrics.cc (revision 113419)
+++ chrome/browser/profiles/profile_metrics.cc (working copy)
@@ -207,3 +207,22 @@
metric,
NUM_PROFILE_GAIA_METRICS);
}
+
+void ProfileMetrics::LogProfileLaunch(FilePath& profile_path) {
+ UMA_HISTOGRAM_ENUMERATION("Profile.LaunchBrowser",
+ GetProfileType(profile_path),
+ NUM_PROFILE_TYPE_METRICS);
+}
+
+void ProfileMetrics::LogNumberOfProfiles(ProfileTime startup) {
+ ProfileManager* manager = g_browser_process->profile_manager();
Ilya Sherman 2011/12/09 01:50:47 I think accessing g_browser_process directly is di
Miranda Callahan 2011/12/09 14:01:02 Using g_b_p is definitely to be avoided (for threa
rpetterson 2011/12/09 21:22:09 Since this function was only called from the Profi
+ size_t number_of_profiles =
+ manager->GetProfileInfoCache().GetNumberOfProfiles();
+ if (startup == TIME_STARTUP) {
+ UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfProfilesOnStartup",
+ number_of_profiles);
+ } else {
+ UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfProfilesOnAddDelete",
jar (doing other things) 2011/12/09 04:57:13 Perhaps a better name here would be: NumberOfProfi
rpetterson 2011/12/09 21:22:09 Changed to NumberOfProfilesAfterAddOrDelete (since
+ number_of_profiles);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698