diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-15 04:17:52 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-15 04:17:52 +0000 |
commit | e6124ad5561dd4c448c9e76c6ee9a0ceff96412d (patch) | |
tree | 82b3138919c255a79ab82a2652219cd3e08e4411 /chrome/browser/browser_main_win.cc | |
parent | c623add7ea499ec7ed90985b5adea97f9185354f (diff) | |
download | chromium_src-e6124ad5561dd4c448c9e76c6ee9a0ceff96412d.zip chromium_src-e6124ad5561dd4c448c9e76c6ee9a0ceff96412d.tar.gz chromium_src-e6124ad5561dd4c448c9e76c6ee9a0ceff96412d.tar.bz2 |
Attempt to reland http://codereview.chromium.org/4928002/
For some reason the Win bot failed to compile the sandbox unit test.
Trybots and my machines don't have these build problems, so I'm going to try again, unchanged.
Original description:
Changing the installer switches from wchar_t[] to char[].
Because of this I'm also refactoring some code that before
was using wstring to build command lines by hand instead of
using the CommandLine class. Now we use CommandLine.
To get this to work correctly, I also needed to fix CommandLine::AppendArguments so I added a little test for it.
TEST=There should be no changes in functionality. Run all installer tests.
BUG=61609
TBR=robertshield
Review URL: http://codereview.chromium.org/4989001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main_win.cc')
-rw-r--r-- | chrome/browser/browser_main_win.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/browser_main_win.cc b/chrome/browser/browser_main_win.cc index 65a991f..7536a3b 100644 --- a/chrome/browser/browser_main_win.cc +++ b/chrome/browser/browser_main_win.cc @@ -188,12 +188,12 @@ bool CheckMachineLevelInstall() { const std::wstring caption = l10n_util::GetString(IDS_PRODUCT_NAME); const UINT flags = MB_OK | MB_ICONERROR | MB_TOPMOST; win_util::MessageBox(NULL, text, caption, flags); - std::wstring uninstall_cmd = InstallUtil::GetChromeUninstallCmd(false); - if (!uninstall_cmd.empty()) { - uninstall_cmd.append(L" --"); - uninstall_cmd.append(installer_util::switches::kForceUninstall); - uninstall_cmd.append(L" --"); - uninstall_cmd.append(installer_util::switches::kDoNotRemoveSharedItems); + FilePath uninstall_path(InstallUtil::GetChromeUninstallCmd(false)); + CommandLine uninstall_cmd(uninstall_path); + if (!uninstall_cmd.GetProgram().value().empty()) { + uninstall_cmd.AppendSwitch(installer_util::switches::kForceUninstall); + uninstall_cmd.AppendSwitch( + installer_util::switches::kDoNotRemoveSharedItems); base::LaunchApp(uninstall_cmd, false, false, NULL); } return true; |