Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: components/signin/core/browser/signin_metrics.cc

Issue 270673003: UMA metrics - number of accounts per profile and account reconciler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial Upload - Metrics, Account Reconciler and UMA configs Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/signin/core/browser/signin_metrics.h"
6
7 #include "base/logging.h"
8 #include "base/metrics/histogram.h"
9 #include "base/metrics/user_metrics.h"
10
11 // static
12 void SigninMetrics::LogSigninAccountReconciliation(int total_number_accounts,
13 int count_added_to_cookie_jar, int count_added_to_token,
14 bool primary_accounts_same, bool is_first_reconcile) {
15 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfAccountsPerProfile",
16 total_number_accounts);
17 // We want to include zeroes in the counts of added accounts to easily
18 // capture _relatively_ how often we merge accounts.
19 if (is_first_reconcile || count_added_to_cookie_jar ||
20 count_added_to_token) {
21 UMA_HISTOGRAM_COUNTS_100("Signin.ReconcilerAddedToCookieJar",
22 count_added_to_cookie_jar);
23 UMA_HISTOGRAM_COUNTS_100("Signin.ReconcilerAddedToChrome",
24 count_added_to_token);
25 }
26 if (!primary_accounts_same) {
27 base::RecordAction(
28 base::UserMetricsAction("AccountReconcilerDifferentPrimaryAccounts"));
Roger Tawa OOO till Jul 10th 2014/05/07 17:05:38 Is there a reason to prefer a user action to a UMA
Mike Lerman 2014/05/07 18:49:37 No, in fact the histogram will be able to filter a
29 }
Roger Tawa OOO till Jul 10th 2014/05/07 17:05:38 Indent whole function body two less.
Mike Lerman 2014/05/07 18:49:37 Done.
30 }
31
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698