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

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

Issue 813133003: New Profile metric for Auth Errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android and Windows compiler errors Created 6 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
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);
+ }
+ }
+
LogLockedProfileInformation(manager);
UpdateReportedOSProfileStatistics(counts.total, counts.signedin);
}

Powered by Google App Engine
This is Rietveld 408576698