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

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

Issue 12033021: Add UMA metrics and histograms for locally managed users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
Index: chrome/browser/profiles/profile_metrics.cc
===================================================================
--- chrome/browser/profiles/profile_metrics.cc (revision 177135)
+++ chrome/browser/profiles/profile_metrics.cc (working copy)
@@ -67,11 +67,19 @@
void ProfileMetrics::LogNumberOfProfiles(ProfileManager* manager,
ProfileEvent startup) {
- size_t number_of_profiles =
- manager->GetProfileInfoCache().GetNumberOfProfiles();
+ const ProfileInfoCache& info_cache = manager->GetProfileInfoCache();
+ size_t number_of_profiles = info_cache.GetNumberOfProfiles();
if (startup == STARTUP_PROFILE_EVENT) {
UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfProfilesOnStartup",
number_of_profiles);
+
+ size_t number_of_managed_profiles = 0;
+ for (size_t i = 0; i < number_of_profiles; ++i) {
+ if (info_cache.ProfileIsManagedAtIndex(i))
+ ++number_of_managed_profiles;
+ }
+ UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfManagedProfilesOnStartup",
+ number_of_managed_profiles);
} else {
UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfProfilesAfterAddOrDelete",
number_of_profiles);
« no previous file with comments | « chrome/browser/profiles/profile_info_cache.h ('k') | chrome/browser/resources/options/manage_profile_overlay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698