| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 DCHECK(metric < NUM_PROFILE_SYNC_METRICS); | 278 DCHECK(metric < NUM_PROFILE_SYNC_METRICS); |
| 279 UMA_HISTOGRAM_ENUMERATION("Profile.SyncCustomize", metric, | 279 UMA_HISTOGRAM_ENUMERATION("Profile.SyncCustomize", metric, |
| 280 NUM_PROFILE_SYNC_METRICS); | 280 NUM_PROFILE_SYNC_METRICS); |
| 281 } | 281 } |
| 282 | 282 |
| 283 void ProfileMetrics::LogProfileAuthResult(ProfileAuth metric) { | 283 void ProfileMetrics::LogProfileAuthResult(ProfileAuth metric) { |
| 284 UMA_HISTOGRAM_ENUMERATION("Profile.AuthResult", metric, | 284 UMA_HISTOGRAM_ENUMERATION("Profile.AuthResult", metric, |
| 285 NUM_PROFILE_AUTH_METRICS); | 285 NUM_PROFILE_AUTH_METRICS); |
| 286 } | 286 } |
| 287 | 287 |
| 288 void ProfileMetrics::LogProfileMirrorEnrollment(ProfileEnrollment metric) { |
| 289 UMA_HISTOGRAM_ENUMERATION("Profile.MirrorEnrollment", metric, |
| 290 NUM_PROFILE_ENROLLMENT_METRICS); |
| 291 } |
| 292 |
| 288 void ProfileMetrics::LogProfileLaunch(Profile* profile) { | 293 void ProfileMetrics::LogProfileLaunch(Profile* profile) { |
| 289 base::FilePath profile_path = profile->GetPath(); | 294 base::FilePath profile_path = profile->GetPath(); |
| 290 UMA_HISTOGRAM_ENUMERATION("Profile.LaunchBrowser", | 295 UMA_HISTOGRAM_ENUMERATION("Profile.LaunchBrowser", |
| 291 GetProfileType(profile_path), | 296 GetProfileType(profile_path), |
| 292 NUM_PROFILE_TYPE_METRICS); | 297 NUM_PROFILE_TYPE_METRICS); |
| 293 | 298 |
| 294 if (profile->IsManaged()) { | 299 if (profile->IsManaged()) { |
| 295 content::RecordAction( | 300 content::RecordAction( |
| 296 base::UserMetricsAction("ManagedMode_NewManagedUserWindow")); | 301 base::UserMetricsAction("ManagedMode_NewManagedUserWindow")); |
| 297 } | 302 } |
| 298 } | 303 } |
| 299 | 304 |
| 300 void ProfileMetrics::LogProfileSyncSignIn(const base::FilePath& profile_path) { | 305 void ProfileMetrics::LogProfileSyncSignIn(const base::FilePath& profile_path) { |
| 301 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", | 306 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", |
| 302 GetProfileType(profile_path), | 307 GetProfileType(profile_path), |
| 303 NUM_PROFILE_TYPE_METRICS); | 308 NUM_PROFILE_TYPE_METRICS); |
| 304 } | 309 } |
| 305 | 310 |
| 306 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { | 311 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { |
| 307 UMA_HISTOGRAM_ENUMERATION("Profile.Update", | 312 UMA_HISTOGRAM_ENUMERATION("Profile.Update", |
| 308 GetProfileType(profile_path), | 313 GetProfileType(profile_path), |
| 309 NUM_PROFILE_TYPE_METRICS); | 314 NUM_PROFILE_TYPE_METRICS); |
| 310 } | 315 } |
| OLD | NEW |