Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2808)

Unified Diff: chrome/installer/setup/setup_main.cc

Issue 4989001: Attempt to reland http://codereview.chromium.org/4928002/... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/setup/install.cc ('k') | chrome/installer/setup/uninstall.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/installer/setup/install.cc ('k') | chrome/installer/setup/uninstall.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698