Commit 7ea71341 authored by Brian Manthos's avatar Brian Manthos Committed by Commit Bot

Remove unused parameter from MoveSetupOutOfInstallFolder

Change-Id: Id7dc42ffdf40842e09e11a1a7434a0e9ed503b12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2341815
Commit-Queue: Brian Manthos <brianman@microsoft.com>
Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795863}
parent 826ef7da
......@@ -602,7 +602,7 @@ installer::InstallStatus UninstallProducts(InstallationState& original_state,
install_status = UninstallProduct(modify_params, remove_all, force, cmd_line);
installer::CleanUpInstallationDirectoryAfterUninstall(
original_state, installer_state, setup_exe, &install_status);
installer_state.target_path(), setup_exe, &install_status);
// The app and vendor dirs may now be empty. Make a last-ditch attempt to
// delete them.
......
......@@ -314,8 +314,7 @@ DeleteResult DeleteUserDataDir(const base::FilePath& user_data_dir) {
// to change the current directory to the TMP directory. On Windows, each
// process has a handle to its CWD. If setup.exe's CWD happens to be within the
// install directory, deletion will fail as a result of the open handle.
bool MoveSetupOutOfInstallFolder(const InstallerState& installer_state,
const base::FilePath& setup_exe) {
bool MoveSetupOutOfInstallFolder(const base::FilePath& setup_exe) {
// The list of files which setup.exe depends on at runtime. Typically this is
// solely setup.exe itself, but in component builds this also includes the
// DLLs installed by setup.exe.
......@@ -1079,15 +1078,13 @@ InstallStatus UninstallProduct(const ModifyParams& modify_params,
}
void CleanUpInstallationDirectoryAfterUninstall(
const InstallationState& original_state,
const InstallerState& installer_state,
const base::FilePath& target_path,
const base::FilePath& setup_exe,
InstallStatus* uninstall_status) {
if (*uninstall_status != UNINSTALL_SUCCESSFUL &&
*uninstall_status != UNINSTALL_REQUIRES_REBOOT) {
return;
}
const base::FilePath target_path(installer_state.target_path());
if (target_path.empty()) {
LOG(ERROR) << "No installation destination path.";
*uninstall_status = UNINSTALL_FAILED;
......@@ -1104,7 +1101,7 @@ void CleanUpInstallationDirectoryAfterUninstall(
// In order to be able to remove the folder in which we're running, we need to
// move setup.exe out of the install folder.
// TODO(tommi): What if the temp folder is on a different volume?
MoveSetupOutOfInstallFolder(installer_state, setup_exe);
MoveSetupOutOfInstallFolder(setup_exe);
// Remove files from "...\<product>\Application\<version>\Installer"
if (!RemoveInstallerFiles(install_directory)) {
......
......@@ -19,7 +19,6 @@ class FilePath;
namespace installer {
class InstallationState;
class InstallerState;
struct ModifyParams;
......@@ -70,15 +69,13 @@ installer::InstallStatus UninstallProduct(const ModifyParams& modify_params,
// installer archive may be deleted. Empty directories will be pruned (or
// scheduled for pruning after reboot, if necessary).
//
// original_state: The installation state of all products on the system.
// installer_state: State associated with this operation.
// target_path: Installation directory.
// setup_exe: The path to the currently running setup.exe, which will be moved
// into a temporary directory to allow for deletion of the installation
// directory.
// uninstall_status: the uninstall status so far (may change during invocation).
void CleanUpInstallationDirectoryAfterUninstall(
const InstallationState& original_state,
const InstallerState& installer_state,
const base::FilePath& target_path,
const base::FilePath& setup_exe,
InstallStatus* uninstall_status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment