Chromium Code Reviews| Index: chrome/browser/profiles/profile_metrics.cc |
| diff --git a/chrome/browser/profiles/profile_metrics.cc b/chrome/browser/profiles/profile_metrics.cc |
| index 0804fd88b8de1a4f9306faa0cec4e890e09404e1..e197267995c4e812ec4f540de69982733d48dfed 100644 |
| --- a/chrome/browser/profiles/profile_metrics.cc |
| +++ b/chrome/browser/profiles/profile_metrics.cc |
| @@ -139,6 +139,7 @@ bool ProfileMetrics::CountProfileInformation(ProfileManager* manager, |
| counts->signedin++; |
| if (info_cache.IsUsingGAIAPictureOfProfileAtIndex(i)) |
| counts->gaia_icon++; |
| + counts->auth_errors[info_cache.ProfileAuthErrorAtIndex(i)]++; |
| } |
| } |
| } |
| @@ -179,6 +180,16 @@ void ProfileMetrics::LogNumberOfProfiles(ProfileManager* manager) { |
| UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfilesWithGAIAIcons", |
| counts.gaia_icon); |
| + for (size_t auth_error = 0; |
| + auth_error < GoogleServiceAuthError::State::NUM_STATES; |
| + auth_error++) { |
| + for (size_t i = 0; i < counts.auth_errors[auth_error]; i++) { |
| + UMA_HISTOGRAM_ENUMERATION("Profile.NumberOfProfileAuthErrors", |
| + auth_error, |
| + GoogleServiceAuthError::State::NUM_STATES); |
| + } |
| + } |
| + |
|
Roger Tawa OOO till Jul 10th
2014/12/19 19:52:33
Should we clear the counts after reporting?
Mike Lerman
2015/01/05 20:24:02
Clear them from the ProfileInfoCache, you mean? No
Roger Tawa OOO till Jul 10th
2015/01/06 22:32:41
You're right, I missed that. Looks good.
|
| LogLockedProfileInformation(manager); |
| UpdateReportedOSProfileStatistics(counts.total, counts.signedin); |
| } |