| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // Track whether or not the user signed in during the first run of Chrome. | 57 // Track whether or not the user signed in during the first run of Chrome. |
| 58 UMA_HISTOGRAM_BOOLEAN("Signin.DuringFirstRun", is_first_run); | 58 UMA_HISTOGRAM_BOOLEAN("Signin.DuringFirstRun", is_first_run); |
| 59 | 59 |
| 60 // Determine how much time passed since install when this profile was signed | 60 // Determine how much time passed since install when this profile was signed |
| 61 // in. | 61 // in. |
| 62 base::TimeDelta elapsed_time = base::Time::Now() - install_date; | 62 base::TimeDelta elapsed_time = base::Time::Now() - install_date; |
| 63 UMA_HISTOGRAM_COUNTS("Signin.ElapsedTimeFromInstallToSignin", | 63 UMA_HISTOGRAM_COUNTS("Signin.ElapsedTimeFromInstallToSignin", |
| 64 elapsed_time.InMinutes()); | 64 elapsed_time.InMinutes()); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void LogSigninSource(Source source) { |
| 68 UMA_HISTOGRAM_ENUMERATION("Signin.SigninSource", source, HISTOGRAM_MAX); |
| 69 } |
| 70 |
| 67 void LogSigninAddAccount() { | 71 void LogSigninAddAccount() { |
| 68 // Account signin may fail for a wide variety of reasons. There is no | 72 // Account signin may fail for a wide variety of reasons. There is no |
| 69 // explicit false, but one can compare this value with the various UI | 73 // explicit false, but one can compare this value with the various UI |
| 70 // flows that lead to account sign-in, and deduce that the difference | 74 // flows that lead to account sign-in, and deduce that the difference |
| 71 // counts the failures. | 75 // counts the failures. |
| 72 UMA_HISTOGRAM_BOOLEAN("Signin.AddAccount", true); | 76 UMA_HISTOGRAM_BOOLEAN("Signin.AddAccount", true); |
| 73 } | 77 } |
| 74 | 78 |
| 75 void LogSignout(ProfileSignout metric) { | 79 void LogSignout(ProfileSignout metric) { |
| 76 UMA_HISTOGRAM_ENUMERATION("Signin.SignoutProfile", metric, | 80 UMA_HISTOGRAM_ENUMERATION("Signin.SignoutProfile", metric, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 87 "Signin.Reconciler.ExternalCcResultTime.Completed", | 91 "Signin.Reconciler.ExternalCcResultTime.Completed", |
| 88 time_to_check_connections); | 92 time_to_check_connections); |
| 89 } else { | 93 } else { |
| 90 UMA_HISTOGRAM_TIMES( | 94 UMA_HISTOGRAM_TIMES( |
| 91 "Signin.Reconciler.ExternalCcResultTime.NotCompleted", | 95 "Signin.Reconciler.ExternalCcResultTime.NotCompleted", |
| 92 time_to_check_connections); | 96 time_to_check_connections); |
| 93 } | 97 } |
| 94 } | 98 } |
| 95 | 99 |
| 96 } // namespace signin_metrics | 100 } // namespace signin_metrics |
| OLD | NEW |