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

Unified Diff: components/browser_sync/profile_sync_service.cc

Issue 2953253002: [DICE] Enable sync for an account that is already present in the token service. (Closed)
Patch Set: Prepare for review Created 3 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/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 44c5cdd97e964fc588db245a1cd8e37f569709d2..018dccb57ed258126e39826cda529fd2143c00e4 100644
--- a/components/browser_sync/profile_sync_service.cc
+++ b/components/browser_sync/profile_sync_service.cc
@@ -1961,6 +1961,12 @@ void ProfileSyncService::GoogleSigninSucceeded(const std::string& account_id,
// Track the fact that we're still waiting for auth to complete.
is_auth_in_progress_ = true;
}
+
+ if (oauth2_token_service_->RefreshTokenIsAvailable(account_id)) {
+ // Start sync if the refresh token is already available in the token service
+ // when the authenticated account is set.
+ OnRefreshTokenAvailable(account_id);
+ }
}
void ProfileSyncService::GoogleSignedOut(const std::string& account_id,

Powered by Google App Engine
This is Rietveld 408576698