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

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: 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 058bc3b3dc24c2d9be5f63d8efdec2aa26cce195..3308d077fc6cc207fca1c7bf707a66270d7ca85d 100644
--- a/components/signin/core/browser/account_reconcilor.cc
+++ b/components/signin/core/browser/account_reconcilor.cc
@@ -587,10 +587,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) {
@@ -656,7 +658,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 | « no previous file | components/signin/core/browser/signin_metrics.h » ('j') | components/signin/core/browser/signin_metrics.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698