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

Unified Diff: components/browser_sync/browser/profile_sync_service.cc

Issue 1991973002: [Sync] Add histograms for cookie jar state on Sessions commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 4 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/browser_sync/browser/profile_sync_service.cc
diff --git a/components/browser_sync/browser/profile_sync_service.cc b/components/browser_sync/browser/profile_sync_service.cc
index 00c29a531edf2e6fb36976ae68895580586743c5..782f56c947264696e8a039d7868ff8ff8a09f06f 100644
--- a/components/browser_sync/browser/profile_sync_service.cc
+++ b/components/browser_sync/browser/profile_sync_service.cc
@@ -2125,19 +2125,21 @@ void ProfileSyncService::OnGaiaAccountsInCookieUpdated(
if (!IsBackendInitialized())
return;
- bool cookie_mismatch = true;
+ bool cookie_jar_mismatch = true;
+ bool cookie_jar_empty = accounts.size() == 0;
std::string account_id = signin_->GetAccountIdToUse();
// Iterate through list of accounts, looking for current sync account.
for (const auto& account : accounts) {
if (account.gaia_id == account_id) {
- cookie_mismatch = false;
+ cookie_jar_mismatch = false;
break;
}
}
- DVLOG(1) << "Cookie jar mismatch: " << cookie_mismatch;
- backend_->OnCookieJarChanged(cookie_mismatch);
+ DVLOG(1) << "Cookie jar mismatch: " << cookie_jar_mismatch;
+ DVLOG(1) << "Cookie jar empty: " << cookie_jar_empty;
+ backend_->OnCookieJarChanged(cookie_jar_mismatch, cookie_jar_empty);
}
void ProfileSyncService::AddObserver(

Powered by Google App Engine
This is Rietveld 408576698