diff options
Diffstat (limited to 'chromium/win8/delegate_execute/command_execute_impl.cc')
-rw-r--r-- | chromium/win8/delegate_execute/command_execute_impl.cc | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/chromium/win8/delegate_execute/command_execute_impl.cc b/chromium/win8/delegate_execute/command_execute_impl.cc index 236f8627156..95324baf8e5 100644 --- a/chromium/win8/delegate_execute/command_execute_impl.cc +++ b/chromium/win8/delegate_execute/command_execute_impl.cc @@ -420,8 +420,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; @@ -450,8 +448,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; @@ -462,31 +458,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; } |