Chromium Code Reviews| 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 accb6da262bd74f3075f342c843cf8e85f299eec..e53a91a84e781509af6a0534f9fb90a08a8d08bb 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" |
| @@ -199,7 +200,8 @@ AccountReconcilor::AccountReconcilor(ProfileOAuth2TokenService* token_service, |
| registered_with_token_service_(false), |
| is_reconcile_started_(false), |
| are_gaia_accounts_set_(false), |
| - requests_(NULL) { |
| + requests_(NULL), |
| + first_execution_(true) { |
| VLOG(1) << "AccountReconcilor::AccountReconcilor"; |
| } |
| @@ -633,6 +635,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(), |
| @@ -645,6 +648,7 @@ void AccountReconcilor::FinishReconcile() { |
| GoogleServiceAuthError::AuthErrorNone()); |
| } else { |
| PerformMergeAction(add_to_cookie_copy[i]); |
| + added_to_cookie++; |
| } |
| } |
| @@ -657,6 +661,11 @@ void AccountReconcilor::FinishReconcile() { |
| PerformAddToChromeAction(i->first, i->second); |
| } |
| + SigninMetrics::LogSigninAccountReconciliation(valid_chrome_accounts_.size(), |
| + added_to_cookie, add_to_chrome_.size(), |
| + are_primaries_equal, first_execution_); |
|
Roger Tawa OOO till Jul 10th
2014/05/07 17:05:38
Spacing is off. Line up all subsequent args under
Mike Lerman
2014/05/07 18:49:37
Done.
|
| + |
| + first_execution_ = false; |
| CalculateIfReconcileIsDone(); |
| ScheduleStartReconcileIfChromeAccountsChanged(); |
| } |