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

Unified Diff: components/browser_sync/profile_sync_service.cc

Issue 2751333007: [Sync] Try to fix race conditions in CookieJarMismatch. (Closed)
Patch Set: Created 3 years, 9 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/profile_sync_service.cc
diff --git a/components/browser_sync/profile_sync_service.cc b/components/browser_sync/profile_sync_service.cc
index 3471651c2eec2c8a78b6cb8e6490ce7330db078d..2470f1741e0955dd3a39abac10e43da762aa512d 100644
--- a/components/browser_sync/profile_sync_service.cc
+++ b/components/browser_sync/profile_sync_service.cc
@@ -2003,6 +2003,15 @@ void ProfileSyncService::OnGaiaAccountsInCookieUpdated(
const std::vector<gaia::ListedAccount>& accounts,
const std::vector<gaia::ListedAccount>& signed_out_accounts,
const GoogleServiceAuthError& error) {
+ OnGaiaAccountsInCookieUpdatedWithCallback(accounts, signed_out_accounts,
+ error, base::Closure());
+}
+
+void ProfileSyncService::OnGaiaAccountsInCookieUpdatedWithCallback(
+ const std::vector<gaia::ListedAccount>& accounts,
+ const std::vector<gaia::ListedAccount>& signed_out_accounts,
+ const GoogleServiceAuthError& error,
+ const base::Closure& callback) {
DCHECK(thread_checker_.CalledOnValidThread());
if (!IsEngineInitialized())
return;
@@ -2021,7 +2030,7 @@ void ProfileSyncService::OnGaiaAccountsInCookieUpdated(
DVLOG(1) << "Cookie jar mismatch: " << cookie_jar_mismatch;
DVLOG(1) << "Cookie jar empty: " << cookie_jar_empty;
- engine_->OnCookieJarChanged(cookie_jar_mismatch, cookie_jar_empty);
+ engine_->OnCookieJarChanged(cookie_jar_mismatch, cookie_jar_empty, callback);
}
void ProfileSyncService::AddProtocolEventObserver(

Powered by Google App Engine
This is Rietveld 408576698