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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
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/file_path.h" 7 #include "base/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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 NUM_PROFILE_TYPE_METRICS); 200 NUM_PROFILE_TYPE_METRICS);
201 } 201 }
202 202
203 void ProfileMetrics::LogProfileSwitchGaia(ProfileGaia metric) { 203 void ProfileMetrics::LogProfileSwitchGaia(ProfileGaia metric) {
204 if (metric == GAIA_OPT_IN) 204 if (metric == GAIA_OPT_IN)
205 LogProfileAvatarSelection(AVATAR_GAIA); 205 LogProfileAvatarSelection(AVATAR_GAIA);
206 UMA_HISTOGRAM_ENUMERATION("Profile.SwitchGaiaPhotoSettings", 206 UMA_HISTOGRAM_ENUMERATION("Profile.SwitchGaiaPhotoSettings",
207 metric, 207 metric,
208 NUM_PROFILE_GAIA_METRICS); 208 NUM_PROFILE_GAIA_METRICS);
209 } 209 }
210
211 void ProfileMetrics::LogProfileLaunch(FilePath& profile_path) {
212 UMA_HISTOGRAM_ENUMERATION("Profile.LaunchBrowser",
213 GetProfileType(profile_path),
214 NUM_PROFILE_TYPE_METRICS);
215 }
216
217 void ProfileMetrics::LogNumberOfProfiles(ProfileTime startup) {
218 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
219 size_t number_of_profiles =
220 manager->GetProfileInfoCache().GetNumberOfProfiles();
221 if (startup == TIME_STARTUP) {
222 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfProfilesOnStartup",
223 number_of_profiles);
224 } else {
225 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
226 number_of_profiles);
227 }
228 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698