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 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 count_added_to_cookie_jar); | 44 count_added_to_cookie_jar); |
45 UMA_HISTOGRAM_COUNTS_100("Signin.Reconciler.AddedToChrome.SubsequentRun", | 45 UMA_HISTOGRAM_COUNTS_100("Signin.Reconciler.AddedToChrome.SubsequentRun", |
46 count_added_to_token); | 46 count_added_to_token); |
47 UMA_HISTOGRAM_ENUMERATION( | 47 UMA_HISTOGRAM_ENUMERATION( |
48 "Signin.Reconciler.DifferentPrimaryAccounts.SubsequentRun", | 48 "Signin.Reconciler.DifferentPrimaryAccounts.SubsequentRun", |
49 ComparePrimaryAccounts(primary_accounts_same, pre_count_gaia_cookies), | 49 ComparePrimaryAccounts(primary_accounts_same, pre_count_gaia_cookies), |
50 NUM_DIFFERENT_PRIMARY_ACCOUNT_METRICS); | 50 NUM_DIFFERENT_PRIMARY_ACCOUNT_METRICS); |
51 } | 51 } |
52 } | 52 } |
53 | 53 |
| 54 void LogSigninProfile(bool is_first_run, base::Time install_date) { |
| 55 // Track whether or not the user signed in during the first run of Chrome. |
| 56 UMA_HISTOGRAM_BOOLEAN("Signin.DuringFirstRun", is_first_run); |
| 57 |
| 58 // Determine how much time passed since install when this profile was signed |
| 59 // in. |
| 60 base::TimeDelta elapsed_time = base::Time::Now() - install_date; |
| 61 UMA_HISTOGRAM_COUNTS("Signin.ElapsedTimeFromInstallToSignin", |
| 62 elapsed_time.InMinutes()); |
| 63 } |
| 64 |
54 void LogSigninAddAccount() { | 65 void LogSigninAddAccount() { |
55 // Account signin may fail for a wide variety of reasons. There is no | 66 // Account signin may fail for a wide variety of reasons. There is no |
56 // explicit false, but one can compare this value with the various UI | 67 // explicit false, but one can compare this value with the various UI |
57 // flows that lead to account sign-in, and deduce that the difference | 68 // flows that lead to account sign-in, and deduce that the difference |
58 // counts the failures. | 69 // counts the failures. |
59 UMA_HISTOGRAM_BOOLEAN("Signin.AddAccount", true); | 70 UMA_HISTOGRAM_BOOLEAN("Signin.AddAccount", true); |
60 } | 71 } |
61 | 72 |
62 void LogSignout(ProfileSignout metric) { | 73 void LogSignout(ProfileSignout metric) { |
63 UMA_HISTOGRAM_ENUMERATION("Signin.SignoutProfile", metric, | 74 UMA_HISTOGRAM_ENUMERATION("Signin.SignoutProfile", metric, |
64 NUM_PROFILE_SIGNOUT_METRICS); | 75 NUM_PROFILE_SIGNOUT_METRICS); |
65 } | 76 } |
66 | 77 |
67 void LogExternalCcResultFetches(bool fetches_completed) { | 78 void LogExternalCcResultFetches(bool fetches_completed) { |
68 UMA_HISTOGRAM_BOOLEAN("Signin.Reconciler.AllExternalCcResultCompleted", | 79 UMA_HISTOGRAM_BOOLEAN("Signin.Reconciler.AllExternalCcResultCompleted", |
69 fetches_completed); | 80 fetches_completed); |
70 } | 81 } |
71 | 82 |
72 } // namespace signin_metrics | 83 } // namespace signin_metrics |
OLD | NEW |