summaryrefslogtreecommitdiffstats
path: root/win8
diff options
context:
space:
mode:
authorgab <gab@chromium.org>2016-01-22 09:37:58 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-22 17:38:54 +0000
commit78d03e0eca0638341f72fa5af9bc9603d6578b0b (patch)
treed302dbf3c3abe6969baed84165a474719701f588 /win8
parent96f3bab913a1a5a972388023bfc3741839670a74 (diff)
downloadchromium_src-78d03e0eca0638341f72fa5af9bc9603d6578b0b.zip
chromium_src-78d03e0eca0638341f72fa5af9bc9603d6578b0b.tar.gz
chromium_src-78d03e0eca0638341f72fa5af9bc9603d6578b0b.tar.bz2
Cleanup DelegateExecute and other Metro registration.
+ stop writing launch_mode to the registry now that we no longer read it after https://codereview.chromium.org/1581473002. + clean launch_mode from existing installs. + fix BrowserDistribution::GetRegistryPath() to not return something for binary distributions. + bump Active Setup major version to trigger per-user registry cleanup BUG=558054, 577751 Review URL: https://codereview.chromium.org/1587123005 Cr-Commit-Position: refs/heads/master@{#370989}
Diffstat (limited to 'win8')
-rw-r--r--win8/delegate_execute/command_execute_impl.cc32
1 files changed, 3 insertions, 29 deletions
diff --git a/win8/delegate_execute/command_execute_impl.cc b/win8/delegate_execute/command_execute_impl.cc
index bae9ee8..e237336 100644
--- a/win8/delegate_execute/command_execute_impl.cc
+++ b/win8/delegate_execute/command_execute_impl.cc
@@ -371,8 +371,6 @@ EC_HOST_UI_MODE CommandExecuteImpl::GetLaunchMode() {
static bool launch_mode_determined = false;
static EC_HOST_UI_MODE launch_mode = ECHUIM_DESKTOP;
- const char* modes[] = { "Desktop", "Immersive", "SysLauncher", "??" };
-
if (launch_mode_determined)
return launch_mode;
@@ -401,8 +399,6 @@ EC_HOST_UI_MODE CommandExecuteImpl::GetLaunchMode() {
return launch_mode;
}
- // From here on, if we can, we will write the outcome
- // of this function to the registry.
if (parameters_.HasSwitch(switches::kForceImmersive)) {
launch_mode = ECHUIM_IMMERSIVE;
launch_mode_determined = true;
@@ -413,31 +409,9 @@ EC_HOST_UI_MODE CommandExecuteImpl::GetLaunchMode() {
parameters_ = base::CommandLine(base::CommandLine::NO_PROGRAM);
}
- base::win::RegKey reg_key;
- LONG key_result = reg_key.Create(HKEY_CURRENT_USER,
- chrome::kMetroRegistryPath,
- KEY_ALL_ACCESS);
- if (key_result != ERROR_SUCCESS) {
- AtlTrace("Failed to open HKCU %ls key, error 0x%x\n",
- chrome::kMetroRegistryPath,
- key_result);
- if (!launch_mode_determined) {
- // If we cannot open the key and we don't know the
- // launch mode we default to desktop mode.
- launch_mode = ECHUIM_DESKTOP;
- launch_mode_determined = true;
- }
- return launch_mode;
- }
-
- if (launch_mode_determined) {
- AtlTrace("Launch mode forced by cmdline to %s\n", modes[launch_mode]);
- reg_key.WriteValue(chrome::kLaunchModeValue,
- static_cast<DWORD>(launch_mode));
- return launch_mode;
+ if (!launch_mode_determined) {
+ launch_mode = ECHUIM_DESKTOP;
+ launch_mode_determined = true;
}
-
- launch_mode = ECHUIM_DESKTOP;
- launch_mode_determined = true;
return launch_mode;
}