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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
288 UMA_HISTOGRAM_ENUMERATION("Profile.AuthResult", metric, | 288 UMA_HISTOGRAM_ENUMERATION("Profile.AuthResult", metric, |
289 NUM_PROFILE_AUTH_METRICS); | 289 NUM_PROFILE_AUTH_METRICS); |
290 } | 290 } |
291 | 291 |
292 void ProfileMetrics::LogProfileUpgradeEnrollment( | 292 void ProfileMetrics::LogProfileUpgradeEnrollment( |
293 ProfileUpgradeEnrollment metric) { | 293 ProfileUpgradeEnrollment metric) { |
294 UMA_HISTOGRAM_ENUMERATION("Profile.UpgradeEnrollment", metric, | 294 UMA_HISTOGRAM_ENUMERATION("Profile.UpgradeEnrollment", metric, |
295 NUM_PROFILE_ENROLLMENT_METRICS); | 295 NUM_PROFILE_ENROLLMENT_METRICS); |
296 } | 296 } |
297 | 297 |
298 void ProfileMetrics::LogProfileDesktopSignout(ProfileDesktopSignout metric, | |
299 bool opened_from_vasquette) { | |
300 // Only type of action be noted; whether Vasquette-sourced or not is specified | |
301 // in |opened_from_vasquette| | |
302 DCHECK(metric < FIRST_VASQUETTE_SIGNOUT_ENUM); | |
303 // If opened from the vasquette, increment the metric to log that | |
304 // this was opened from the vasquette. | |
305 if (opened_from_vasquette) { | |
306 metric = static_cast<ProfileDesktopSignout>( | |
307 metric + FIRST_VASQUETTE_SIGNOUT_ENUM + 1); | |
Alexei Svitkine (slow)
2014/05/14 14:15:22
Instead of doing this funny business with a set of
Mike Lerman
2014/05/14 19:46:15
Having the data points all in the same histogram w
Alexei Svitkine (slow)
2014/05/14 19:55:04
No, it's not possible to combine them into one. Bu
| |
308 } | |
309 UMA_HISTOGRAM_ENUMERATION("Profile.DesktopSignout", metric, | |
310 NUM_PROFILE_DESKTOP_SIGNOUT_METRICS); | |
311 } | |
312 | |
298 void ProfileMetrics::LogProfileLaunch(Profile* profile) { | 313 void ProfileMetrics::LogProfileLaunch(Profile* profile) { |
299 base::FilePath profile_path = profile->GetPath(); | 314 base::FilePath profile_path = profile->GetPath(); |
300 UMA_HISTOGRAM_ENUMERATION("Profile.LaunchBrowser", | 315 UMA_HISTOGRAM_ENUMERATION("Profile.LaunchBrowser", |
301 GetProfileType(profile_path), | 316 GetProfileType(profile_path), |
302 NUM_PROFILE_TYPE_METRICS); | 317 NUM_PROFILE_TYPE_METRICS); |
303 | 318 |
304 if (profile->IsManaged()) { | 319 if (profile->IsManaged()) { |
305 content::RecordAction( | 320 content::RecordAction( |
306 base::UserMetricsAction("ManagedMode_NewManagedUserWindow")); | 321 base::UserMetricsAction("ManagedMode_NewManagedUserWindow")); |
307 } | 322 } |
308 } | 323 } |
309 | 324 |
310 void ProfileMetrics::LogProfileSyncSignIn(const base::FilePath& profile_path) { | 325 void ProfileMetrics::LogProfileSyncSignIn(const base::FilePath& profile_path) { |
311 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", | 326 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", |
312 GetProfileType(profile_path), | 327 GetProfileType(profile_path), |
313 NUM_PROFILE_TYPE_METRICS); | 328 NUM_PROFILE_TYPE_METRICS); |
314 } | 329 } |
315 | 330 |
316 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { | 331 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { |
317 UMA_HISTOGRAM_ENUMERATION("Profile.Update", | 332 UMA_HISTOGRAM_ENUMERATION("Profile.Update", |
318 GetProfileType(profile_path), | 333 GetProfileType(profile_path), |
319 NUM_PROFILE_TYPE_METRICS); | 334 NUM_PROFILE_TYPE_METRICS); |
320 } | 335 } |
OLD | NEW |