| Index: chrome/browser/extensions/api/identity/experimental_identity_api.cc
|
| diff --git a/chrome/browser/extensions/api/identity/experimental_identity_api.cc b/chrome/browser/extensions/api/identity/experimental_identity_api.cc
|
| index 11e24081ab2160ab41c95aac8b8272919e31259a..f71b9acfd699181d98d0f83b854317add1806412 100644
|
| --- a/chrome/browser/extensions/api/identity/experimental_identity_api.cc
|
| +++ b/chrome/browser/extensions/api/identity/experimental_identity_api.cc
|
| @@ -236,7 +236,8 @@ void ExperimentalIdentityGetAuthTokenFunction::StartLoginAccessTokenRequest() {
|
| if (chromeos::UserManager::Get()->GetAppModeChromeClientOAuthInfo(
|
| &app_client_id, &app_client_secret)) {
|
| login_token_request_ =
|
| - service->StartRequestForClient(app_client_id,
|
| + service->StartRequestForClient(service->GetPrimaryAccountId(),
|
| + app_client_id,
|
| app_client_secret,
|
| OAuth2TokenService::ScopeSet(),
|
| this);
|
| @@ -244,8 +245,8 @@ void ExperimentalIdentityGetAuthTokenFunction::StartLoginAccessTokenRequest() {
|
| }
|
| }
|
| #endif
|
| - login_token_request_ = service->StartRequest(OAuth2TokenService::ScopeSet(),
|
| - this);
|
| + login_token_request_ = service->StartRequest(
|
| + service->GetPrimaryAccountId(), OAuth2TokenService::ScopeSet(), this);
|
| }
|
|
|
| void ExperimentalIdentityGetAuthTokenFunction::StartGaiaRequest(
|
| @@ -289,8 +290,10 @@ ExperimentalIdentityGetAuthTokenFunction::CreateMintTokenFlow(
|
| }
|
|
|
| bool ExperimentalIdentityGetAuthTokenFunction::HasLoginToken() const {
|
| - return ProfileOAuth2TokenServiceFactory::GetForProfile(profile())->
|
| - RefreshTokenIsAvailable();
|
| + ProfileOAuth2TokenService* token_service =
|
| + ProfileOAuth2TokenServiceFactory::GetForProfile(profile());
|
| + return token_service->RefreshTokenIsAvailable(
|
| + token_service->GetPrimaryAccountId());
|
| }
|
|
|
| ExperimentalIdentityLaunchWebAuthFlowFunction::
|
|
|