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

Unified Diff: chrome/installer/util/install_util.cc

Issue 11420045: Launch system-level Active Setup immediately following self-destruction of a user-level Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 8 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/util/install_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/install_util.cc
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index db710d47d9f85fb116098574e5d5bca6a9f4be7f..d98a30b5037145aefa3fcc425c4044ab3cbb8e20 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -23,6 +23,7 @@
#include "base/sys_info.h"
#include "base/values.h"
#include "base/version.h"
+#include "base/win/metro.h"
#include "base/win/registry.h"
#include "base/win/windows_version.h"
#include "chrome/installer/util/browser_distribution.h"
@@ -126,14 +127,7 @@ string16 InstallUtil::GetActiveSetupPath(BrowserDistribution* dist) {
return kInstalledComponentsPath + dist->GetAppGuid();
}
-void InstallUtil::TriggerActiveSetupCommandIfNeeded() {
- FilePath chrome_exe;
- if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
- NOTREACHED();
- } else if (InstallUtil::IsPerUserInstall(chrome_exe.value().c_str())) {
- return;
- }
-
+void InstallUtil::TriggerActiveSetupCommand() {
string16 active_setup_reg(
GetActiveSetupPath(BrowserDistribution::GetDistribution()));
base::win::RegKey active_setup_key(
@@ -152,8 +146,10 @@ void InstallUtil::TriggerActiveSetupCommandIfNeeded() {
// and the time setup.exe checks for it.
cmd.AppendSwitch(installer::switches::kForceConfigureUserSettings);
- base::LaunchOptions default_options;
- if (!base::LaunchProcess(cmd.GetCommandLineString(), default_options, NULL))
+ base::LaunchOptions launch_options;
+ if (base::win::IsMetroProcess())
+ launch_options.force_breakaway_from_job_ = true;
+ if (!base::LaunchProcess(cmd.GetCommandLineString(), launch_options, NULL))
PLOG(ERROR) << cmd.GetCommandLineString();
}
« no previous file with comments | « chrome/installer/util/install_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698