Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/signin/core/browser/signin_metrics.h" | 5 #include "components/signin/core/browser/signin_metrics.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/metrics/user_metrics.h" | 9 #include "base/metrics/user_metrics.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 void LogAuthError(GoogleServiceAuthError::State auth_error) { | 100 void LogAuthError(GoogleServiceAuthError::State auth_error) { |
| 101 UMA_HISTOGRAM_ENUMERATION("Signin.AuthError", auth_error, | 101 UMA_HISTOGRAM_ENUMERATION("Signin.AuthError", auth_error, |
| 102 GoogleServiceAuthError::State::NUM_STATES); | 102 GoogleServiceAuthError::State::NUM_STATES); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void LogSigninConfirmHistogramValue(int action) { | 105 void LogSigninConfirmHistogramValue(int action) { |
| 106 UMA_HISTOGRAM_ENUMERATION("Signin.OneClickConfirmation", action, | 106 UMA_HISTOGRAM_ENUMERATION("Signin.OneClickConfirmation", action, |
| 107 signin_metrics::HISTOGRAM_CONFIRM_MAX); | 107 signin_metrics::HISTOGRAM_CONFIRM_MAX); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void LogXDevicePromoEligible(CrossDevicePromoEligibility metric) { | |
| 111 UMA_HISTOGRAM_ENUMERATION( | |
| 112 "Signin.XDevicePromo.Eligibility", metric, | |
| 113 CrossDevicePromoEligibility::NUM_CROSS_DEVICE_PROMO_ELIGIBILITY_METRICS); | |
|
Alexei Svitkine (slow)
2015/05/19 17:10:38
Nit: No need for the enum name prefix. Here and be
Mike Lerman
2015/05/19 18:17:35
Done.
| |
| 114 } | |
| 115 | |
| 116 void LogXDevicePromoInitialized(CrossDevicePromoInitialized metric) { | |
| 117 UMA_HISTOGRAM_ENUMERATION( | |
| 118 "Signin.XDevicePromo.Initialized", metric, | |
| 119 CrossDevicePromoInitialized::NUM_CROSS_DEVICE_PROMO_INITIALIZED_METRICS); | |
| 120 } | |
| 121 | |
| 122 void LogBrowsingSessionDuration(const base::Time& previous_activity) { | |
| 123 UMA_HISTOGRAM_CUSTOM_COUNTS( | |
| 124 "Signin.XDevicePromo.BrowsingSessionDuration", | |
| 125 (base::Time::Now() - previous_activity).InMinutes(), 1, | |
| 126 base::TimeDelta::FromDays(30).InMinutes(), 50); | |
| 127 } | |
| 128 | |
| 110 } // namespace signin_metrics | 129 } // namespace signin_metrics |
| OLD | NEW |