Index: chrome/installer/setup/install_worker.cc |
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc |
index d3366303404614eae086cd17f8ba6f37dcd9bd50..6c624350de62d9efb3cd900fa3e0f4ee4b0ba332 100644 |
--- a/chrome/installer/setup/install_worker.cc |
+++ b/chrome/installer/setup/install_worker.cc |
@@ -71,6 +71,11 @@ const wchar_t kIELowRightsPolicyOldGuid[] = |
const wchar_t kElevationPolicyKeyPath[] = |
L"SOFTWARE\\Microsoft\\Internet Explorer\\Low Rights\\ElevationPolicy\\"; |
+// The legacy command ids for installing an application or extension. These are |
+// only here so they can be removed from the registry. |
+const wchar_t kLegacyCmdInstallApp[] = L"install-application"; |
+const wchar_t kLegacyCmdInstallExtension[] = L"install-extension"; |
+ |
void GetOldIELowRightsElevationPolicyKeyPath(base::string16* key_path) { |
key_path->assign(kElevationPolicyKeyPath, |
arraysize(kElevationPolicyKeyPath) - 1); |
@@ -230,31 +235,16 @@ void AddCommandWithParameterWorkItems(const InstallerState& installer_state, |
} |
} |
-void AddInstallAppCommandWorkItems(const InstallerState& installer_state, |
- const InstallationState& machine_state, |
- const Version& new_version, |
- const Product& product, |
- WorkItemList* work_item_list) { |
- DCHECK(product.is_chrome_app_host()); |
- AddCommandWithParameterWorkItems(installer_state, machine_state, new_version, |
- product, kCmdInstallApp, |
- installer::kChromeAppHostExe, |
- ::switches::kInstallFromWebstore, |
- work_item_list); |
-} |
- |
-void AddInstallExtensionCommandWorkItem(const InstallerState& installer_state, |
- const InstallationState& machine_state, |
- const base::FilePath& setup_path, |
- const Version& new_version, |
- const Product& product, |
- WorkItemList* work_item_list) { |
- DCHECK(product.is_chrome()); |
- AddCommandWithParameterWorkItems(installer_state, machine_state, new_version, |
- product, kCmdInstallExtension, |
- installer::kChromeExe, |
- ::switches::kLimitedInstallFromWebstore, |
- work_item_list); |
+void AddLegacyRemovalItem(const InstallerState& installer_state, |
+ const Product& product, |
+ const wchar_t* name, |
+ WorkItemList* work_item_list) { |
+ // These failures are ignored because this is a clean-up operation that |
+ // shouldn't block an install or update on failing. |
+ work_item_list->AddDeleteRegKeyWorkItem( |
+ installer_state.root_key(), |
+ GetRegCommandKey(product.distribution(), name), |
+ KEY_WOW64_32KEY)->set_ignore_failure(true); |
} |
// A callback invoked by |work_item| that adds firewall rules for Chrome. Rules |
@@ -401,17 +391,15 @@ void AddProductSpecificWorkItems(const InstallationState& original_state, |
for (Products::const_iterator it = products.begin(); it < products.end(); |
++it) { |
const Product& p = **it; |
- if (p.is_chrome_app_host()) { |
- AddInstallAppCommandWorkItems(installer_state, original_state, |
- new_version, p, list); |
- } |
+ if (p.is_chrome_app_host()) |
+ AddLegacyRemovalItem(installer_state, p, kLegacyCmdInstallApp, list); |
if (p.is_chrome()) { |
AddOsUpgradeWorkItems(installer_state, setup_path, new_version, p, |
list); |
- AddInstallExtensionCommandWorkItem(installer_state, original_state, |
- setup_path, new_version, p, list); |
AddFirewallRulesWorkItems( |
installer_state, p.distribution(), is_new_install, list); |
+ AddLegacyRemovalItem( |
+ installer_state, p, kLegacyCmdInstallExtension, list); |
} |
if (p.is_chrome_binaries()) { |
AddQueryEULAAcceptanceWorkItems( |
@@ -1345,6 +1333,12 @@ void AddInstallWorkItems(const InstallationState& original_state, |
current_version == NULL, |
install_list); |
+ // Remove the legacy "install-application" commmand from all products. |
grt (UTC plus 2)
2014/09/30 18:59:26
this isn't quite right. the kCmdInstallApp will on
Devlin
2014/09/30 19:10:12
Done.
|
+ for (Products::const_iterator it = products.begin(); it < products.end(); |
+ ++it) { |
+ AddLegacyRemovalItem(installer_state, **p, kLegacyCmdInstallApp, list); |
+ } |
+ |
// Copy over brand, usagestats, and other values. |
AddGoogleUpdateWorkItems(original_state, installer_state, install_list); |