| 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 4920f55dcb563446432f8a03a9116f3f66091b22..5839991f2d1da8b50b4ad0c92e30de944d135f80 100644
|
| --- a/chrome/browser/extensions/api/identity/experimental_identity_api.cc
|
| +++ b/chrome/browser/extensions/api/identity/experimental_identity_api.cc
|
| @@ -235,7 +235,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);
|
| @@ -243,8 +244,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(
|
| @@ -288,8 +289,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::
|
|
|