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

Unified Diff: chrome/browser/signin/google_auto_login_helper.cc

Issue 63253003: Fix issues with token refresh in AccountReconcilor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip Created 7 years, 1 month 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: chrome/browser/signin/google_auto_login_helper.cc
diff --git a/chrome/browser/signin/google_auto_login_helper.cc b/chrome/browser/signin/google_auto_login_helper.cc
index 09cb58a6827945e21241be7770792d1d6e1c5ed4..6672a29150448dd211837b431aadda6234d7791c 100644
--- a/chrome/browser/signin/google_auto_login_helper.cc
+++ b/chrome/browser/signin/google_auto_login_helper.cc
@@ -24,6 +24,13 @@ void GoogleAutoLoginHelper::LogIn(const std::string& account_id) {
uber_token_fetcher_->StartFetchingToken(account_id);
}
+void GoogleAutoLoginHelper::LogIn(const std::deque<std::string>& account_ids) {
+ accounts_ = account_ids;
+ uber_token_fetcher_.reset(new UbertokenFetcher(profile_, this));
+ uber_token_fetcher_->StartFetchingToken(accounts_.front());
+ accounts_.pop_front();
+}
+
void GoogleAutoLoginHelper::OnUbertokenSuccess(const std::string& uber_token) {
gaia_auth_fetcher_.reset(new GaiaAuthFetcher(
this, GaiaConstants::kChromeSource, profile_->GetRequestContext()));
@@ -38,7 +45,12 @@ void GoogleAutoLoginHelper::OnUbertokenFailure(
void GoogleAutoLoginHelper::OnMergeSessionSuccess(const std::string& data) {
DVLOG(1) << "MergeSession successful." << data;
- base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ if (accounts_.empty()) {
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ } else {
+ LogIn(accounts_.front());
+ accounts_.pop_front();
+ }
}
void GoogleAutoLoginHelper::OnMergeSessionFailure(

Powered by Google App Engine
This is Rietveld 408576698