From 1a214b609a6139d95cd3f7ee861757baa15c0125 Mon Sep 17 00:00:00 2001 From: raven Date: Fri, 5 Sep 2025 22:18:51 +0800 Subject: [PATCH] chrome test patch --- .../standalone_trusted_vault_backend.cc | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/components/trusted_vault/standalone_trusted_vault_backend.cc b/components/trusted_vault/standalone_trusted_vault_backend.cc index c6cfb06fdd200a..b001ca88322cb2 100644 --- a/components/trusted_vault/standalone_trusted_vault_backend.cc +++ b/components/trusted_vault/standalone_trusted_vault_backend.cc @@ -526,37 +526,37 @@ void StandaloneTrustedVaultBackend::AddTrustedRecoveryMethod( return; } - if (!primary_account_.has_value() || - refresh_token_error_state_ == - RefreshTokenErrorState::kPersistentAuthError) { - // Defer until SetPrimaryAccount() gets called and there are no persistent - // auth errors. Note that the latter is important, because this method can - // be called while the auth error is being resolved and there is no order - // guarantee. - pending_trusted_recovery_method_ = PendingTrustedRecoveryMethod(); - pending_trusted_recovery_method_->gaia_id = gaia_id; - pending_trusted_recovery_method_->public_key = public_key; - pending_trusted_recovery_method_->method_type_hint = method_type_hint; - pending_trusted_recovery_method_->completion_callback = std::move(cb); - return; - } - - DCHECK(!pending_trusted_recovery_method_.has_value()); - - if (primary_account_->gaia != gaia_id) { - std::move(cb).Run(); - return; - } + // if (!primary_account_.has_value() || + // refresh_token_error_state_ == + // RefreshTokenErrorState::kPersistentAuthError) { + // // Defer until SetPrimaryAccount() gets called and there are no persistent + // // auth errors. Note that the latter is important, because this method can + // // be called while the auth error is being resolved and there is no order + // // guarantee. + // pending_trusted_recovery_method_ = PendingTrustedRecoveryMethod(); + // pending_trusted_recovery_method_->gaia_id = gaia_id; + // pending_trusted_recovery_method_->public_key = public_key; + // pending_trusted_recovery_method_->method_type_hint = method_type_hint; + // pending_trusted_recovery_method_->completion_callback = std::move(cb); + // return; + // } + + // DCHECK(!pending_trusted_recovery_method_.has_value()); + + // if (primary_account_->gaia != gaia_id) { + // std::move(cb).Run(); + // return; + // } trusted_vault_pb::LocalTrustedVaultPerUser* per_user_vault = storage_->FindUserVault(gaia_id); - DCHECK(per_user_vault); + // DCHECK(per_user_vault); - if (per_user_vault->vault_key().empty()) { - // Can't add recovery method while there are no local keys. - std::move(cb).Run(); - return; - } + // if (per_user_vault->vault_key().empty()) { + // // Can't add recovery method while there are no local keys. + // std::move(cb).Run(); + // return; + // } std::unique_ptr imported_public_key = SecureBoxPublicKey::CreateByImport(public_key); -- 2.38.1.windows.1