Index: chrome/installer/setup/setup_main.cc |
=================================================================== |
--- chrome/installer/setup/setup_main.cc (revision 66087) |
+++ chrome/installer/setup/setup_main.cc (working copy) |
@@ -401,7 +401,6 @@ |
} |
installer_util::InstallStatus UninstallChrome(const CommandLine& cmd_line, |
- const wchar_t* cmd_params, |
const installer::Version* version, |
bool system_install) { |
VLOG(1) << "Uninstalling Chome"; |
@@ -420,7 +419,7 @@ |
return installer_setup::UninstallChrome(cmd_line.GetProgram().value(), |
system_install, |
remove_all, force, |
- cmd_line, cmd_params); |
+ cmd_line); |
} |
installer_util::InstallStatus ShowEULADialog(const std::wstring& inner_frame) { |
@@ -681,14 +680,13 @@ |
if (system_install && !IsUserAnAdmin()) { |
if (base::win::GetVersion() >= base::win::VERSION_VISTA && |
!parsed_command_line.HasSwitch(installer_util::switches::kRunAsAdmin)) { |
- std::wstring exe = parsed_command_line.GetProgram().value(); |
- std::wstring params(command_line); |
+ CommandLine new_cmd(CommandLine::NO_PROGRAM); |
+ new_cmd.AppendArguments(parsed_command_line, true); |
// Append --run-as-admin flag to let the new instance of setup.exe know |
// that we already tried to launch ourselves as admin. |
- params.append(L" --"); |
- params.append(installer_util::switches::kRunAsAdmin); |
+ new_cmd.AppendSwitch(installer_util::switches::kRunAsAdmin); |
DWORD exit_code = installer_util::UNKNOWN_STATUS; |
- InstallUtil::ExecuteExeAsAdmin(exe, params, &exit_code); |
+ InstallUtil::ExecuteExeAsAdmin(new_cmd, &exit_code); |
return exit_code; |
} else { |
LOG(ERROR) << "Non admin user can not install system level Chrome."; |
@@ -710,7 +708,6 @@ |
// If --uninstall option is given, uninstall chrome |
if (parsed_command_line.HasSwitch(installer_util::switches::kUninstall)) { |
install_status = UninstallChrome(parsed_command_line, |
- command_line, |
installed_version.get(), |
system_install); |
// If --uninstall option is not specified, we assume it is install case. |