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, ...@@ -602,7 +602,7 @@ installer::InstallStatus UninstallProducts(InstallationState& original_state,
install_status = UninstallProduct(modify_params, remove_all, force, cmd_line); install_status = UninstallProduct(modify_params, remove_all, force, cmd_line);
installer::CleanUpInstallationDirectoryAfterUninstall( 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 // The app and vendor dirs may now be empty. Make a last-ditch attempt to
// delete them. // delete them.
......
...@@ -314,8 +314,7 @@ DeleteResult DeleteUserDataDir(const base::FilePath& user_data_dir) { ...@@ -314,8 +314,7 @@ DeleteResult DeleteUserDataDir(const base::FilePath& user_data_dir) {
// to change the current directory to the TMP directory. On Windows, each // 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 // 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. // install directory, deletion will fail as a result of the open handle.
bool MoveSetupOutOfInstallFolder(const InstallerState& installer_state, bool MoveSetupOutOfInstallFolder(const base::FilePath& setup_exe) {
const base::FilePath& setup_exe) {
// The list of files which setup.exe depends on at runtime. Typically this is // 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 // solely setup.exe itself, but in component builds this also includes the
// DLLs installed by setup.exe. // DLLs installed by setup.exe.
...@@ -1079,15 +1078,13 @@ InstallStatus UninstallProduct(const ModifyParams& modify_params, ...@@ -1079,15 +1078,13 @@ InstallStatus UninstallProduct(const ModifyParams& modify_params,
} }
void CleanUpInstallationDirectoryAfterUninstall( void CleanUpInstallationDirectoryAfterUninstall(
const InstallationState& original_state, const base::FilePath& target_path,
const InstallerState& installer_state,
const base::FilePath& setup_exe, const base::FilePath& setup_exe,
InstallStatus* uninstall_status) { InstallStatus* uninstall_status) {
if (*uninstall_status != UNINSTALL_SUCCESSFUL && if (*uninstall_status != UNINSTALL_SUCCESSFUL &&
*uninstall_status != UNINSTALL_REQUIRES_REBOOT) { *uninstall_status != UNINSTALL_REQUIRES_REBOOT) {
return; return;
} }
const base::FilePath target_path(installer_state.target_path());
if (target_path.empty()) { if (target_path.empty()) {
LOG(ERROR) << "No installation destination path."; LOG(ERROR) << "No installation destination path.";
*uninstall_status = UNINSTALL_FAILED; *uninstall_status = UNINSTALL_FAILED;
...@@ -1104,7 +1101,7 @@ void CleanUpInstallationDirectoryAfterUninstall( ...@@ -1104,7 +1101,7 @@ void CleanUpInstallationDirectoryAfterUninstall(
// In order to be able to remove the folder in which we're running, we need to // 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. // move setup.exe out of the install folder.
// TODO(tommi): What if the temp folder is on a different volume? // 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" // Remove files from "...\<product>\Application\<version>\Installer"
if (!RemoveInstallerFiles(install_directory)) { if (!RemoveInstallerFiles(install_directory)) {
......
...@@ -19,7 +19,6 @@ class FilePath; ...@@ -19,7 +19,6 @@ class FilePath;
namespace installer { namespace installer {
class InstallationState;
class InstallerState; class InstallerState;
struct ModifyParams; struct ModifyParams;
...@@ -70,15 +69,13 @@ installer::InstallStatus UninstallProduct(const ModifyParams& modify_params, ...@@ -70,15 +69,13 @@ installer::InstallStatus UninstallProduct(const ModifyParams& modify_params,
// installer archive may be deleted. Empty directories will be pruned (or // installer archive may be deleted. Empty directories will be pruned (or
// scheduled for pruning after reboot, if necessary). // scheduled for pruning after reboot, if necessary).
// //
// original_state: The installation state of all products on the system. // target_path: Installation directory.
// installer_state: State associated with this operation.
// setup_exe: The path to the currently running setup.exe, which will be moved // 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 // into a temporary directory to allow for deletion of the installation
// directory. // directory.
// uninstall_status: the uninstall status so far (may change during invocation). // uninstall_status: the uninstall status so far (may change during invocation).
void CleanUpInstallationDirectoryAfterUninstall( void CleanUpInstallationDirectoryAfterUninstall(
const InstallationState& original_state, const base::FilePath& target_path,
const InstallerState& installer_state,
const base::FilePath& setup_exe, const base::FilePath& setup_exe,
InstallStatus* uninstall_status); 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