Files
brave-core/patches/chrome-browser-extensions-api-identity-identity_get_auth_token_function.cc.patch

28 lines
1.5 KiB
Diff

diff --git a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc
index 5fce00075b9cfe488b75f6a670966d2203a5ed84..9ea2402b23e2843659aeea3f4f17139e113b7af1 100644
--- a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc
+++ b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc
@@ -274,6 +274,7 @@ ExtensionFunction::ResponseAction IdentityGetAuthTokenFunction::Run() {
// From here on out, results must be returned asynchronously.
StartAsyncRun();
+ BRAVE_RUN
// TODO(crbug.com/40614113): collapse the asynchronicity
base::OnceCallback next_step =
base::BindOnce(&IdentityGetAuthTokenFunction::GetAuthTokenForAccount,
@@ -452,12 +453,14 @@ void IdentityGetAuthTokenFunction::StartSigninFlow() {
void IdentityGetAuthTokenFunction::StartMintTokenFlow(
IdentityMintRequestQueue::MintType type) {
#if !BUILDFLAG(IS_CHROMEOS)
+ BRAVE_START_MINT_TOKEN_FLOW_IF
// ChromeOS in kiosk mode may start the mint token flow without account.
DCHECK(!token_key_.account_info.IsEmpty())
<< "token_key_.account_info is empty!";
DCHECK(IdentityManagerFactory::GetForProfile(GetProfile())
->HasAccountWithRefreshToken(token_key_.account_info.account_id))
<< "No Refresh token!";
+ BRAVE_START_MINT_TOKEN_FLOW_ELSE
#endif
TRACE_EVENT_BEGIN("identity", "MintTokenFlow",
perfetto::Track::FromPointer(this), "type", type);