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

Unified Diff: chrome/browser/chrome_browser_main_win.cc

Issue 11685006: [Fixit-Dec-2012] Auto-launch system-level Chrome post user-level Chrome self-destruction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +++grt Created 7 years, 12 months 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 | « no previous file | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main_win.cc
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc
index 67850bafb37462585818d4656910ea88774481f4..463c94134ee8c0536233921abd86c681e694d4f5 100644
--- a/chrome/browser/chrome_browser_main_win.cc
+++ b/chrome/browser/chrome_browser_main_win.cc
@@ -358,13 +358,26 @@ bool ChromeBrowserMainPartsWin::CheckMachineLevelInstall() {
CommandLine uninstall_cmd(
InstallUtil::GetChromeUninstallCmd(false, dist->GetType()));
if (!uninstall_cmd.GetProgram().empty()) {
+ uninstall_cmd.AppendSwitch(installer::switches::kSelfDestruct);
uninstall_cmd.AppendSwitch(installer::switches::kForceUninstall);
uninstall_cmd.AppendSwitch(
installer::switches::kDoNotRemoveSharedItems);
- base::LaunchOptions launch_options;
+
+ const FilePath setup_exe(uninstall_cmd.GetProgram());
+ const string16 params(uninstall_cmd.GetArgumentsString());
+
+ SHELLEXECUTEINFO sei = { sizeof(sei) };
+ sei.fMask = SEE_MASK_NOASYNC;
+ sei.nShow = SW_SHOWNORMAL;
+ sei.lpFile = setup_exe.value().c_str();
+ sei.lpParameters = params.c_str();
+ // On Windows 8 SEE_MASK_FLAG_LOG_USAGE is necessary to guarantee we
+ // flip to the Desktop when launching.
if (is_metro)
- launch_options.force_breakaway_from_job_ = true;
- base::LaunchProcess(uninstall_cmd, launch_options, NULL);
+ sei.fMask |= SEE_MASK_FLAG_LOG_USAGE;
+
+ if (!::ShellExecuteEx(&sei))
+ DPCHECK(false);
}
return true;
}
« no previous file with comments | « no previous file | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698