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

Unified Diff: components/signin/core/browser/account_reconcilor.cc

Issue 338573002: Differentiate primary account compares on GAIA cookie presence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 6 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 c5077bb1f12136e3d854f64fcb99c0d2308bd395..dcaf39de72785a7785798da2c5df86f521cc1174 100644
--- a/components/signin/core/browser/account_reconcilor.cc
+++ b/components/signin/core/browser/account_reconcilor.cc
@@ -604,10 +604,12 @@ void AccountReconcilor::FinishReconcile() {
DCHECK(add_to_cookie_.empty());
DCHECK(add_to_chrome_.empty());
+ int number_gaia_accounts = gaia_accounts_.size();
bool are_primaries_equal =
- gaia_accounts_.size() > 0 &&
+ number_gaia_accounts > 0 &&
gaia::AreEmailsSame(primary_account_, gaia_accounts_[0].first);
+
if (are_primaries_equal) {
// Determine if we need to merge accounts from gaia cookie to chrome.
for (size_t i = 0; i < gaia_accounts_.size(); ++i) {
@@ -675,7 +677,8 @@ void AccountReconcilor::FinishReconcile() {
added_to_cookie,
add_to_chrome_.size(),
are_primaries_equal,
- first_execution_);
+ first_execution_,
+ number_gaia_accounts);
first_execution_ = false;
CalculateIfReconcileIsDone();
ScheduleStartReconcileIfChromeAccountsChanged();
« no previous file with comments | « chrome/browser/signin/account_reconcilor_unittest.cc ('k') | components/signin/core/browser/signin_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698