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

Unified Diff: chrome/installer/setup/uninstall.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/uninstall.h ('k') | chrome/installer/util/google_chrome_distribution.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/uninstall.cc
===================================================================
--- chrome/installer/setup/uninstall.cc (revision 66087)
+++ chrome/installer/setup/uninstall.cc (working copy)
@@ -470,7 +470,7 @@
installer_util::InstallStatus installer_setup::UninstallChrome(
const std::wstring& exe_path, bool system_uninstall,
bool remove_all, bool force_uninstall,
- const CommandLine& cmd_line, const wchar_t* cmd_params) {
+ const CommandLine& cmd_line) {
installer_util::InstallStatus status = installer_util::UNINSTALL_CONFIRMED;
std::wstring suffix;
if (!ShellUtil::GetUserSpecificDefaultBrowserSuffix(&suffix))
@@ -496,23 +496,19 @@
!::IsUserAnAdmin() &&
(base::win::GetVersion() >= base::win::VERSION_VISTA) &&
!cmd_line.HasSwitch(installer_util::switches::kRunAsAdmin)) {
- std::wstring exe = cmd_line.GetProgram().value();
- std::wstring params(cmd_params);
+ CommandLine new_cmd(CommandLine::NO_PROGRAM);
+ new_cmd.AppendArguments(cmd_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);
// Append --remove-chrome-registration to remove registry keys only.
- params.append(L" --");
- params.append(installer_util::switches::kRemoveChromeRegistration);
+ new_cmd.AppendSwitch(installer_util::switches::kRemoveChromeRegistration);
if (!suffix.empty()) {
- params.append(L" --");
- params.append(ASCIIToWide(
- installer_util::switches::kRegisterChromeBrowserSuffix));
- params.append(L"=\"" + suffix + L"\"");
+ new_cmd.AppendSwitchNative(
+ installer_util::switches::kRegisterChromeBrowserSuffix, suffix);
}
DWORD exit_code = installer_util::UNKNOWN_STATUS;
- InstallUtil::ExecuteExeAsAdmin(exe, params, &exit_code);
+ InstallUtil::ExecuteExeAsAdmin(new_cmd, &exit_code);
}
}
« no previous file with comments | « chrome/installer/setup/uninstall.h ('k') | chrome/installer/util/google_chrome_distribution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698