signin_metrics.h revision cedac228d2dd51db4b79ea1e72c7f249408ee061
1c3aae25116e66c177579b0b79182b09340b19753Chris Lattner// Copyright 2014 The Chromium Authors. All rights reserved.
2ea61c358720aa6c7a159d51658b34276316aa841Misha Brukman// Use of this source code is governed by a BSD-style license that can be
36fbcc26f1460eaee4e0eb8b426fc1ff0c7af11beJohn Criswell// found in the LICENSE file.
46fbcc26f1460eaee4e0eb8b426fc1ff0c7af11beJohn Criswell
57ed47a13356daed2a34cd2209a31f92552e3bdd8Chris Lattner#ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
67ed47a13356daed2a34cd2209a31f92552e3bdd8Chris Lattner#define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
7ea61c358720aa6c7a159d51658b34276316aa841Misha Brukman
86fbcc26f1460eaee4e0eb8b426fc1ff0c7af11beJohn Criswellnamespace signin_metrics {
9ea61c358720aa6c7a159d51658b34276316aa841Misha Brukman
10c3aae25116e66c177579b0b79182b09340b19753Chris Lattner// Log to UMA histograms and UserCounts stats about a single execution of the
11c3aae25116e66c177579b0b79182b09340b19753Chris Lattner// AccountReconciler.
12ea61c358720aa6c7a159d51658b34276316aa841Misha Brukman// |total_number_accounts| - How many accounts are in the browser for this
13cacf462915344c2af25eef1af1f3ee2c7280ff56Chris Lattner//                           profile.
14cacf462915344c2af25eef1af1f3ee2c7280ff56Chris Lattner// |count_added_to_cookie_jar| - How many accounts were in the browser but not
15cacf462915344c2af25eef1af1f3ee2c7280ff56Chris Lattner//                               the cookie jar.
16cacf462915344c2af25eef1af1f3ee2c7280ff56Chris Lattner// |count_added_to_token| - How may accounts were in the cookie jar but not in
17cacf462915344c2af25eef1af1f3ee2c7280ff56Chris Lattner//                          the browser.
18fed90b6d097d50881afb45e4d79f430db66dd741Dan Gohman// |primary_accounts_same| - False if the primary account for the cookie jar
19c5e7e8d87d4a3b10edd5ac93ba1f3cdb4d1b449aDavid Greene//                           and the token service were different; else true.
204b84086e89d86fb16f562166d9fea8df37db6be7Dan Gohman// |is_first_reconcile| - True if these stats are from the first execution of
21583bd47f777fe3eb8305872fa0eadab31e833dffJim Laskey//                        the AccountReconcilor.
22c76909abfec876c6b751d693ebd3df07df686aa0Dan Gohmanvoid LogSigninAccountReconciliation(int total_number_accounts,
2398a366d547772010e94609e4584489b3e5ce0043Bill Wendling                                    int count_added_to_cookie_jar,
24acaf09dbe4a6781163857db1321bbd5795e7d410Dan Gohman                                    int count_added_to_token,
255892d47a625638a90afeb31dd4f6f80a2f9bacdeChris Lattner                                    bool primary_accounts_same,
26322812e603705e1c2037313633e72f689524b163Evan Cheng                                    bool is_first_reconcile);
27eb19e40efbd3cae80c908a30cdf4d33450733c45Chris Lattner
28d0fde30ce850b78371fd1386338350591f9ff494Brian Gaeke// Track a successful signin.
29d0fde30ce850b78371fd1386338350591f9ff494Brian Gaekevoid LogSigninAddAccount();
30fed90b6d097d50881afb45e4d79f430db66dd741Dan Gohman
31fed90b6d097d50881afb45e4d79f430db66dd741Dan Gohman}  // namespace signin_metrics
326e7a1617ac4a34792d9097b8d3644b72f57a45f7Devang Patel
33fed90b6d097d50881afb45e4d79f430db66dd741Dan Gohman#endif  // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
34b4e6a5df5dada0cd919cc6e2717eb3118db9cc45Bill Wendling