OLD | NEW |
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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 UMA_HISTOGRAM_ENUMERATION("Profile.OpenMethod", metric, | 261 UMA_HISTOGRAM_ENUMERATION("Profile.OpenMethod", metric, |
262 NUM_PROFILE_OPEN_METRICS); | 262 NUM_PROFILE_OPEN_METRICS); |
263 } | 263 } |
264 | 264 |
265 void ProfileMetrics::LogProfileSyncInfo(ProfileSync metric) { | 265 void ProfileMetrics::LogProfileSyncInfo(ProfileSync metric) { |
266 DCHECK(metric < NUM_PROFILE_SYNC_METRICS); | 266 DCHECK(metric < NUM_PROFILE_SYNC_METRICS); |
267 UMA_HISTOGRAM_ENUMERATION("Profile.SyncCustomize", metric, | 267 UMA_HISTOGRAM_ENUMERATION("Profile.SyncCustomize", metric, |
268 NUM_PROFILE_SYNC_METRICS); | 268 NUM_PROFILE_SYNC_METRICS); |
269 } | 269 } |
270 | 270 |
| 271 void ProfileMetrics::LogProfileAuthResult(ProfileAuth metric) { |
| 272 UMA_HISTOGRAM_ENUMERATION("Profile.AuthResult", metric, |
| 273 NUM_PROFILE_AUTH_METRICS); |
| 274 } |
| 275 |
271 void ProfileMetrics::LogProfileLaunch(Profile* profile) { | 276 void ProfileMetrics::LogProfileLaunch(Profile* profile) { |
272 base::FilePath profile_path = profile->GetPath(); | 277 base::FilePath profile_path = profile->GetPath(); |
273 UMA_HISTOGRAM_ENUMERATION("Profile.LaunchBrowser", | 278 UMA_HISTOGRAM_ENUMERATION("Profile.LaunchBrowser", |
274 GetProfileType(profile_path), | 279 GetProfileType(profile_path), |
275 NUM_PROFILE_TYPE_METRICS); | 280 NUM_PROFILE_TYPE_METRICS); |
276 | 281 |
277 if (profile->IsManaged()) { | 282 if (profile->IsManaged()) { |
278 content::RecordAction( | 283 content::RecordAction( |
279 base::UserMetricsAction("ManagedMode_NewManagedUserWindow")); | 284 base::UserMetricsAction("ManagedMode_NewManagedUserWindow")); |
280 } | 285 } |
281 } | 286 } |
282 | 287 |
283 void ProfileMetrics::LogProfileSyncSignIn(const base::FilePath& profile_path) { | 288 void ProfileMetrics::LogProfileSyncSignIn(const base::FilePath& profile_path) { |
284 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", | 289 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", |
285 GetProfileType(profile_path), | 290 GetProfileType(profile_path), |
286 NUM_PROFILE_TYPE_METRICS); | 291 NUM_PROFILE_TYPE_METRICS); |
287 } | 292 } |
288 | 293 |
289 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { | 294 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { |
290 UMA_HISTOGRAM_ENUMERATION("Profile.Update", | 295 UMA_HISTOGRAM_ENUMERATION("Profile.Update", |
291 GetProfileType(profile_path), | 296 GetProfileType(profile_path), |
292 NUM_PROFILE_TYPE_METRICS); | 297 NUM_PROFILE_TYPE_METRICS); |
293 } | 298 } |
OLD | NEW |