diff options
author | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-18 15:09:02 +0000 |
---|---|---|
committer | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-18 15:09:02 +0000 |
commit | 99850109dd6b08b23f02675af99eccde08cd0b57 (patch) | |
tree | 6b6d841b8a639b1c09809f6afd18f3221441d8b4 | |
parent | c6ff734cef5b4f50bc63cf8cefd180d65405dba9 (diff) | |
download | chromium_src-99850109dd6b08b23f02675af99eccde08cd0b57.zip chromium_src-99850109dd6b08b23f02675af99eccde08cd0b57.tar.gz chromium_src-99850109dd6b08b23f02675af99eccde08cd0b57.tar.bz2 |
Always do DelegateExecute handler COM registration and make set dual mode prop on shortcuts.
This is in support of the pre-win8 -> win8 upgrade scenario.
BUG=128131,127734
TEST=manual: install on pre-win8 and confirm that the COM registration for the DelegateExecute handler is present in HKCR (Google Chrome: {5C65F4B0-3651-4514-B207-D10CB699B14B} or Chromium: {A2DF06F9-A21A-44A8-8A99-8B9C84F29160}) and that the start menu shortcut has the dual mode juju.
Review URL: https://chromiumcodereview.appspot.com/10386167
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137863 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/file_util_win.cc | 1 | ||||
-rw-r--r-- | base/win/win_util.cc | 2 | ||||
-rw-r--r-- | chrome/installer/util/browser_distribution.cc | 22 | ||||
-rw-r--r-- | chrome/installer/util/browser_distribution.h | 3 | ||||
-rw-r--r-- | chrome/installer/util/google_chrome_distribution.cc | 22 | ||||
-rw-r--r-- | chrome/installer/util/shell_util.cc | 1 |
6 files changed, 19 insertions, 32 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc index 922e34a..bbd6680 100644 --- a/base/file_util_win.cc +++ b/base/file_util_win.cc @@ -424,7 +424,6 @@ bool CreateOrUpdateShortcutLink(const wchar_t *source, if (app_id && !base::win::SetAppIdForPropertyStore(property_store, app_id)) return false; if (is_dual_mode && - base::win::GetVersion() >= base::win::VERSION_WIN8 && !base::win::SetDualModeForPropertyStore(property_store)) { return false; } diff --git a/base/win/win_util.cc b/base/win/win_util.cc index c72a474..96507d5 100644 --- a/base/win/win_util.cc +++ b/base/win/win_util.cc @@ -191,8 +191,6 @@ bool SetAppIdForPropertyStore(IPropertyStore* property_store, } bool SetDualModeForPropertyStore(IPropertyStore* property_store) { - DCHECK_GE(base::win::GetVersion(), base::win::VERSION_WIN8); - return SetBooleanValueForPropertyStore(property_store, PKEY_AppUserModel_DualMode, true) && diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc index f34df7c..6ca1b42 100644 --- a/chrome/installer/util/browser_distribution.cc +++ b/chrome/installer/util/browser_distribution.cc @@ -244,19 +244,15 @@ bool BrowserDistribution::GetDelegateExecuteHandlerData( string16* type_lib_uuid, string16* type_lib_version, string16* interface_uuid) { - // Chrome's DelegateExecute verb handler is only used for Windows 8 and up. - if (base::win::GetVersion() >= base::win::VERSION_WIN8) { - if (handler_class_uuid) - *handler_class_uuid = kCommandExecuteImplUuid; - if (type_lib_uuid) - *type_lib_uuid = kDelegateExecuteLibUuid; - if (type_lib_version) - *type_lib_version = kDelegateExecuteLibVersion; - if (interface_uuid) - *interface_uuid = kICommandExecuteImplUuid; - return true; - } - return false; + if (handler_class_uuid) + *handler_class_uuid = kCommandExecuteImplUuid; + if (type_lib_uuid) + *type_lib_uuid = kDelegateExecuteLibUuid; + if (type_lib_version) + *type_lib_version = kDelegateExecuteLibVersion; + if (interface_uuid) + *interface_uuid = kICommandExecuteImplUuid; + return true; } void BrowserDistribution::UpdateInstallStatus(bool system_install, diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h index 894fc465..8944db9 100644 --- a/chrome/installer/util/browser_distribution.h +++ b/chrome/installer/util/browser_distribution.h @@ -122,9 +122,6 @@ class BrowserDistribution { // |type_lib_uuid| and |type_lib_version| identify its type library. // |interface_uuid| is the ICommandExecuteImpl interface UUID. // Only non-null parameters will be set, others will be ignored. - // Implementations that only provide a DelegateExecute handler for use on - // certain OS versions must only return true when run on those supported - // systems. virtual bool GetDelegateExecuteHandlerData(string16* handler_class_uuid, string16* type_lib_uuid, string16* type_lib_version, diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc index b11942b..84aa4be 100644 --- a/chrome/installer/util/google_chrome_distribution.cc +++ b/chrome/installer/util/google_chrome_distribution.cc @@ -546,19 +546,15 @@ bool GoogleChromeDistribution::GetDelegateExecuteHandlerData( string16* type_lib_uuid, string16* type_lib_version, string16* interface_uuid) { - // Chrome's DelegateExecute verb handler is only used for Windows 8 and up. - if (base::win::GetVersion() >= base::win::VERSION_WIN8) { - if (handler_class_uuid) - *handler_class_uuid = kCommandExecuteImplUuid; - if (type_lib_uuid) - *type_lib_uuid = kDelegateExecuteLibUuid; - if (type_lib_version) - *type_lib_version = kDelegateExecuteLibVersion; - if (interface_uuid) - *interface_uuid = kICommandExecuteImplUuid; - return true; - } - return false; + if (handler_class_uuid) + *handler_class_uuid = kCommandExecuteImplUuid; + if (type_lib_uuid) + *type_lib_uuid = kDelegateExecuteLibUuid; + if (type_lib_version) + *type_lib_version = kDelegateExecuteLibVersion; + if (interface_uuid) + *interface_uuid = kICommandExecuteImplUuid; + return true; } // This method checks if we need to change "ap" key in Google Update to try diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index 45eaf52..7753fc6 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc @@ -92,6 +92,7 @@ class RegistryEntry { // TODO(grt): remove HasDelegateExecuteHandler when the exe is ever-present; // see also install_worker.cc's AddDelegateExecuteWorkItems. bool set_delegate_execute = + base::win::GetVersion() >= base::win::VERSION_WIN8 && dist->GetDelegateExecuteHandlerData(&delegate_guid, NULL, NULL, NULL) && InstallUtil::HasDelegateExecuteHandler(dist, chrome_exe); |