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

Unified Diff: components/signin/core/browser/account_reconcilor.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
Index: components/signin/core/browser/account_reconcilor.cc
diff --git a/components/signin/core/browser/account_reconcilor.cc b/components/signin/core/browser/account_reconcilor.cc
index 271f3e0e5a6eb164adcf67cfa52d6e5bc09c0c90..82a1c0b6cc3fd5050d05563ed01a4f66fec86861 100644
--- a/components/signin/core/browser/account_reconcilor.cc
+++ b/components/signin/core/browser/account_reconcilor.cc
@@ -15,6 +15,7 @@
#include "base/time/time.h"
#include "components/signin/core/browser/profile_oauth2_token_service.h"
#include "components/signin/core/browser/signin_client.h"
+#include "components/signin/core/browser/signin_metrics.h"
#include "components/signin/core/browser/signin_oauth_helper.h"
#include "google_apis/gaia/gaia_auth_fetcher.h"
#include "google_apis/gaia/gaia_auth_util.h"
@@ -198,6 +199,7 @@ AccountReconcilor::AccountReconcilor(ProfileOAuth2TokenService* token_service,
this),
registered_with_token_service_(false),
is_reconcile_started_(false),
+ first_execution_(true),
are_gaia_accounts_set_(false),
requests_(NULL) {
VLOG(1) << "AccountReconcilor::AccountReconcilor";
@@ -609,6 +611,7 @@ void AccountReconcilor::FinishReconcile() {
// completed otherwise. Make a copy of |add_to_cookie_| since calls to
// SignalComplete() will change the array.
std::vector<std::string> add_to_cookie_copy = add_to_cookie_;
+ int added_to_cookie = 0;
for (size_t i = 0; i < add_to_cookie_copy.size(); ++i) {
if (gaia_accounts_.end() !=
std::find_if(gaia_accounts_.begin(),
@@ -621,6 +624,7 @@ void AccountReconcilor::FinishReconcile() {
GoogleServiceAuthError::AuthErrorNone());
} else {
PerformMergeAction(add_to_cookie_copy[i]);
+ added_to_cookie++;
}
}
@@ -633,6 +637,12 @@ void AccountReconcilor::FinishReconcile() {
PerformAddToChromeAction(i->first, i->second);
}
+ signin_metrics::LogSigninAccountReconciliation(valid_chrome_accounts_.size(),
+ added_to_cookie,
+ add_to_chrome_.size(),
+ are_primaries_equal,
+ first_execution_);
+ first_execution_ = false;
CalculateIfReconcileIsDone();
ScheduleStartReconcileIfChromeAccountsChanged();
}
« no previous file with comments | « components/signin/core/browser/account_reconcilor.h ('k') | components/signin/core/browser/signin_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698