| 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 b6bce398f0101227e6079f383a4d0687a653f7d9..e4c15c1f896fc14cbf2f5fb097a544ce7c5850c5 100644
|
| --- a/chrome/browser/extensions/api/identity/identity_api.cc
|
| +++ b/chrome/browser/extensions/api/identity/identity_api.cc
|
| @@ -928,18 +928,17 @@ IdentityRemoveCachedAuthTokenFunction::
|
| ~IdentityRemoveCachedAuthTokenFunction() {
|
| }
|
|
|
| -bool IdentityRemoveCachedAuthTokenFunction::RunSync() {
|
| - if (GetProfile()->IsOffTheRecord()) {
|
| - error_ = identity_constants::kOffTheRecord;
|
| - return false;
|
| - }
|
| +ExtensionFunction::ResponseAction IdentityRemoveCachedAuthTokenFunction::Run() {
|
| + if (Profile::FromBrowserContext(browser_context())->IsOffTheRecord())
|
| + return RespondNow(Error(identity_constants::kOffTheRecord));
|
|
|
| std::unique_ptr<identity::RemoveCachedAuthToken::Params> params(
|
| identity::RemoveCachedAuthToken::Params::Create(*args_));
|
| EXTENSION_FUNCTION_VALIDATE(params.get());
|
| - IdentityAPI::GetFactoryInstance()->Get(GetProfile())->EraseCachedToken(
|
| - extension()->id(), params->details.token);
|
| - return true;
|
| + IdentityAPI::GetFactoryInstance()
|
| + ->Get(browser_context())
|
| + ->EraseCachedToken(extension()->id(), params->details.token);
|
| + return RespondNow(NoArguments());
|
| }
|
|
|
| IdentityLaunchWebAuthFlowFunction::IdentityLaunchWebAuthFlowFunction() {}
|
|
|