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

Unified 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: Fix compile error, out-of-order parameter 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/signin/core/browser/signin_metrics.h ('k') | tools/metrics/actions/extract_actions.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/signin/core/browser/signin_metrics.cc
diff --git a/components/signin/core/browser/signin_metrics.cc b/components/signin/core/browser/signin_metrics.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5b53df8ac8baa50b546c53ebb7a3da7b82942797
--- /dev/null
+++ b/components/signin/core/browser/signin_metrics.cc
@@ -0,0 +1,40 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/signin/core/browser/signin_metrics.h"
+
+#include "base/logging.h"
+#include "base/metrics/histogram.h"
+#include "base/metrics/user_metrics.h"
+
+namespace signin_metrics {
+
+void LogSigninAccountReconciliation(int total_number_accounts,
+ int count_added_to_cookie_jar,
+ int count_added_to_token,
+ bool primary_accounts_same,
+ bool is_first_reconcile) {
+ UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfAccountsPerProfile",
+ total_number_accounts);
+ // We want to include zeroes in the counts of added accounts to easily
+ // capture _relatively_ how often we merge accounts.
+ if (is_first_reconcile) {
+ UMA_HISTOGRAM_COUNTS_100("Signin.Reconciler.AddedToCookieJar.FirstRun",
+ count_added_to_cookie_jar);
+ UMA_HISTOGRAM_COUNTS_100("Signin.Reconciler.AddedToChrome.FirstRun",
+ count_added_to_token);
+ UMA_HISTOGRAM_BOOLEAN("Signin.Reconciler.DifferentPrimaryAccounts.FirstRun",
+ !primary_accounts_same);
+ } else {
+ UMA_HISTOGRAM_COUNTS_100("Signin.Reconciler.AddedToCookieJar.SubsequentRun",
+ count_added_to_cookie_jar);
+ UMA_HISTOGRAM_COUNTS_100("Signin.Reconciler.AddedToChrome.SubsequentRun",
+ count_added_to_token);
+ UMA_HISTOGRAM_BOOLEAN(
+ "Signin.Reconciler.DifferentPrimaryAccounts.SubsequentRun",
+ !primary_accounts_same);
+ }
+}
+
+} // namespace signin_metrics
« no previous file with comments | « components/signin/core/browser/signin_metrics.h ('k') | tools/metrics/actions/extract_actions.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698