Index: chrome/browser/extensions/api/identity/identity_api.cc |
diff --git a/chrome/browser/extensions/api/identity/identity_api.cc b/chrome/browser/extensions/api/identity/identity_api.cc |
index 128fb6ed190b141be5030cd28621168fd23b13e3..2566eba69e5efc07d0b1b860a240a4c1d4ac2cbf 100644 |
--- a/chrome/browser/extensions/api/identity/identity_api.cc |
+++ b/chrome/browser/extensions/api/identity/identity_api.cc |
@@ -433,8 +433,8 @@ void IdentityGetAuthTokenFunction::StartLoginAccessTokenRequest() { |
} |
} |
#endif |
- login_token_request_ = service->StartRequest(OAuth2TokenService::ScopeSet(), |
- this); |
+ login_token_request_ = service->StartRequest( |
+ service->GetPrimaryAccountId(), OAuth2TokenService::ScopeSet(), this); |
} |
void IdentityGetAuthTokenFunction::StartGaiaRequest( |
@@ -478,8 +478,10 @@ OAuth2MintTokenFlow* IdentityGetAuthTokenFunction::CreateMintTokenFlow( |
} |
bool IdentityGetAuthTokenFunction::HasLoginToken() const { |
- return ProfileOAuth2TokenServiceFactory::GetForProfile(profile())-> |
- RefreshTokenIsAvailable(); |
+ ProfileOAuth2TokenService* token_service = |
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile()); |
+ return token_service->RefreshTokenIsAvailable( |
+ token_service->GetPrimaryAccountId()); |
} |
std::string IdentityGetAuthTokenFunction::MapOAuth2ErrorToDescription( |