diff options
author | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 15:59:07 +0000 |
---|---|---|
committer | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 15:59:07 +0000 |
commit | e212a306bfbdaac64b4e1a5134dd42b7a0d773af (patch) | |
tree | 692bcab8a54d9510bc08080d99dd0b7a735bb9a7 /chrome/browser/chrome_browser_main_win.cc | |
parent | f9f1cf1323062c4062b42f3196a0b42c4b6cc8b9 (diff) | |
download | chromium_src-e212a306bfbdaac64b4e1a5134dd42b7a0d773af.zip chromium_src-e212a306bfbdaac64b4e1a5134dd42b7a0d773af.tar.gz chromium_src-e212a306bfbdaac64b4e1a5134dd42b7a0d773af.tar.bz2 |
Revert 166582 - Force Metro vs Desktop preference back to Desktop when Chrome is launched after it lost default browser.
BUG=159869
TEST=Singleton-mode still works as expected.
Launching Chrome after it lost default launches on Desktop, setting as default again and relaunching it still launches from Desktop even if pref used to be to launch in Metro.
Prefer Metro mode, set IE as default, set Chrome back to default without launching it in between, Chrome still launches in Metro mode.
Review URL: https://codereview.chromium.org/11369122
TBR=gab@chromium.org
Review URL: https://codereview.chromium.org/11410089
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167683 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_browser_main_win.cc')
-rw-r--r-- | chrome/browser/chrome_browser_main_win.cc | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc index 9cbd305..10ed28d 100644 --- a/chrome/browser/chrome_browser_main_win.cc +++ b/chrome/browser/chrome_browser_main_win.cc @@ -6,22 +6,18 @@ #include <windows.h> #include <shellapi.h> -#include <shobjidl.h> #include <algorithm> -#include "base/bind.h" #include "base/command_line.h" #include "base/environment.h" #include "base/i18n/rtl.h" -#include "base/location.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" #include "base/scoped_native_library.h" #include "base/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "base/win/metro.h" -#include "base/win/registry.h" #include "base/win/text_services_message_filter.h" #include "base/win/windows_version.h" #include "base/win/wrapped_window_proc.h" @@ -43,7 +39,6 @@ #include "chrome/installer/util/install_util.h" #include "chrome/installer/util/l10n_string_util.h" #include "chrome/installer/util/shell_util.h" -#include "content/public/browser/browser_thread.h" #include "content/public/common/main_function_params.h" #include "grit/app_locale_settings.h" #include "grit/chromium_strings.h" @@ -94,28 +89,6 @@ class TranslationDelegate : public installer::TranslationDelegate { virtual string16 GetLocalizedString(int installer_string_id) OVERRIDE; }; -// Forces the Desktop vs Metro preference on Win8 back to Desktop if Chrome has -// lost default browser. This is to prevent a case where Chrome is running on -// the Desktop and is made default again (at which point subsequent launches -// would try to launch in Metro and fail, rdv'ing back to Desktop Chrome). -void ResetLaunchModePreferenceIfLostDefaultOnWin8() { - DCHECK(base::win::GetVersion() >= base::win::VERSION_WIN8); - if (ShellIntegration::IsDefaultBrowser() != - ShellIntegration::IS_DEFAULT_WEB_CLIENT) { - DWORD reg_value = 0; - base::win::RegKey reg_key(HKEY_CURRENT_USER, chrome::kMetroRegistryPath, - KEY_ALL_ACCESS); - if (reg_key.Valid() && - reg_key.ReadValueDW(chrome::kLaunchModeValue, - ®_value) == ERROR_SUCCESS && - reg_value != ECHUIM_DESKTOP && - reg_key.WriteValue(chrome::kLaunchModeValue, - ECHUIM_DESKTOP) != ERROR_SUCCESS) { - NOTREACHED(); - } - } -} - } // namespace void RecordBreakpadStatusUMA(MetricsService* metrics) { @@ -270,12 +243,6 @@ void ChromeBrowserMainPartsWin::PreMainMessageLoopRun() { command_line.GetSwitchValueASCII(switches::kViewerConnection))); } #endif - - if (base::win::GetVersion() >= base::win::VERSION_WIN8) { - content::BrowserThread::PostTask( - content::BrowserThread::FILE, FROM_HERE, - base::Bind(&ResetLaunchModePreferenceIfLostDefaultOnWin8)); - } } // static |