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

Side by Side 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: ChromeSigninClient handles no ProfileManager for tests Created 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/profiles/profile_metrics.h ('k') | chrome/browser/signin/chrome_signin_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_metrics.h" 5 #include "chrome/browser/profiles/profile_metrics.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 for (size_t i = 0; i < number_of_profiles; ++i) { 132 for (size_t i = 0; i < number_of_profiles; ++i) {
133 if (!HasProfileAtIndexBeenActiveSince(info_cache, i, oldest)) { 133 if (!HasProfileAtIndexBeenActiveSince(info_cache, i, oldest)) {
134 counts->unused++; 134 counts->unused++;
135 } else { 135 } else {
136 if (info_cache.ProfileIsSupervisedAtIndex(i)) 136 if (info_cache.ProfileIsSupervisedAtIndex(i))
137 counts->supervised++; 137 counts->supervised++;
138 if (!info_cache.GetUserNameOfProfileAtIndex(i).empty()) { 138 if (!info_cache.GetUserNameOfProfileAtIndex(i).empty()) {
139 counts->signedin++; 139 counts->signedin++;
140 if (info_cache.IsUsingGAIAPictureOfProfileAtIndex(i)) 140 if (info_cache.IsUsingGAIAPictureOfProfileAtIndex(i))
141 counts->gaia_icon++; 141 counts->gaia_icon++;
142 if (info_cache.ProfileIsAuthErrorAtIndex(i))
143 counts->auth_errors++;
142 } 144 }
143 } 145 }
144 } 146 }
145 return true; 147 return true;
146 } 148 }
147 149
148 150
149 void ProfileMetrics::UpdateReportedProfilesStatistics(ProfileManager* manager) { 151 void ProfileMetrics::UpdateReportedProfilesStatistics(ProfileManager* manager) {
150 ProfileCounts counts; 152 ProfileCounts counts;
151 if (CountProfileInformation(manager, &counts)) { 153 if (CountProfileInformation(manager, &counts)) {
(...skipping 19 matching lines...) Expand all
171 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfManagedProfiles", 173 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfManagedProfiles",
172 counts.supervised); 174 counts.supervised);
173 UMA_HISTOGRAM_COUNTS_100("Profile.PercentageOfManagedProfiles", 175 UMA_HISTOGRAM_COUNTS_100("Profile.PercentageOfManagedProfiles",
174 100 * counts.supervised / counts.total); 176 100 * counts.supervised / counts.total);
175 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfiles", 177 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfiles",
176 counts.signedin); 178 counts.signedin);
177 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfUnusedProfiles", 179 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfUnusedProfiles",
178 counts.unused); 180 counts.unused);
179 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfilesWithGAIAIcons", 181 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfilesWithGAIAIcons",
180 counts.gaia_icon); 182 counts.gaia_icon);
183 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfProfilesWithAuthErrors",
184 counts.auth_errors);
181 185
182 LogLockedProfileInformation(manager); 186 LogLockedProfileInformation(manager);
183 UpdateReportedOSProfileStatistics(counts.total, counts.signedin); 187 UpdateReportedOSProfileStatistics(counts.total, counts.signedin);
184 } 188 }
185 } 189 }
186 190
187 void ProfileMetrics::LogProfileAddNewUser(ProfileAdd metric) { 191 void ProfileMetrics::LogProfileAddNewUser(ProfileAdd metric) {
188 DCHECK(metric < NUM_PROFILE_ADD_METRICS); 192 DCHECK(metric < NUM_PROFILE_ADD_METRICS);
189 UMA_HISTOGRAM_ENUMERATION("Profile.AddNewUser", metric, 193 UMA_HISTOGRAM_ENUMERATION("Profile.AddNewUser", metric,
190 NUM_PROFILE_ADD_METRICS); 194 NUM_PROFILE_ADD_METRICS);
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", 464 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn",
461 GetProfileType(profile_path), 465 GetProfileType(profile_path),
462 NUM_PROFILE_TYPE_METRICS); 466 NUM_PROFILE_TYPE_METRICS);
463 } 467 }
464 468
465 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { 469 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) {
466 UMA_HISTOGRAM_ENUMERATION("Profile.Update", 470 UMA_HISTOGRAM_ENUMERATION("Profile.Update",
467 GetProfileType(profile_path), 471 GetProfileType(profile_path),
468 NUM_PROFILE_TYPE_METRICS); 472 NUM_PROFILE_TYPE_METRICS);
469 } 473 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_metrics.h ('k') | chrome/browser/signin/chrome_signin_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698