From 1150c17e71d5d15c462431d76f015bff41d3df2f Mon Sep 17 00:00:00 2001 From: brave-builds Date: Wed, 3 Jan 2024 18:15:27 +0000 Subject: [PATCH] Uplift of #21478 (squashed) to release --- chromium_src/chrome/installer/setup/uninstall.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/chromium_src/chrome/installer/setup/uninstall.cc b/chromium_src/chrome/installer/setup/uninstall.cc index fef9d98d8e3e..a57da18aae36 100644 --- a/chromium_src/chrome/installer/setup/uninstall.cc +++ b/chromium_src/chrome/installer/setup/uninstall.cc @@ -69,6 +69,14 @@ InstallStatus UninstallProduct(const ModifyParams& modify_params, bool remove_all, bool force_uninstall, const base::CommandLine& cmd_line) { + InstallStatus ret = UninstallProduct_ChromiumImpl(modify_params, remove_all, + force_uninstall, cmd_line); + + // Early return if user cancelled. + if (ret == installer::UNINSTALL_CANCELLED) { + return ret; + } + DeleteBraveFileKeys(HKEY_CURRENT_USER); const auto installer_state = modify_params.installer_state; @@ -100,8 +108,8 @@ InstallStatus UninstallProduct(const ModifyParams& modify_params, } brave_vpn::ras::RemoveEntry(brave_vpn::GetBraveVPNConnectionName()); #endif - return UninstallProduct_ChromiumImpl(modify_params, remove_all, - force_uninstall, cmd_line); + + return ret; } } // namespace installer