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

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

Issue 1380103004: Delay fetching account info until OnRefreshTokensLoaded(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix iOs Created 5 years, 2 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: chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc
diff --git a/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc b/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc
index d0e6559bcd0b1f80eeaf011094bec58564e6eebc..30262785effc829777f5fc5d185cfe2b827ceaf5 100644
--- a/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc
+++ b/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc
@@ -238,7 +238,10 @@ MutableProfileOAuth2TokenServiceDelegate::GetRequestContext() const {
void MutableProfileOAuth2TokenServiceDelegate::LoadCredentials(
const std::string& primary_account_id) {
- DCHECK(!primary_account_id.empty());
+ if (primary_account_id.empty()) {
+ FireRefreshTokensLoaded();
+ return;
+ }
ValidateAccountId(primary_account_id);
DCHECK(loading_primary_account_id_.empty());
DCHECK_EQ(0, web_data_service_request_);

Powered by Google App Engine
This is Rietveld 408576698