diff options
author | grt <grt@chromium.org> | 2015-02-16 13:32:19 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-16 21:32:57 +0000 |
commit | b9f50bea0c513a6c3c6983e94d021ca40ea790aa (patch) | |
tree | 541166547805b6e26c9de22848c41f5d1d65da63 /chrome/installer/setup | |
parent | d09e1d96a90e5a46e28a5cbb233feda986fa10d3 (diff) | |
download | chromium_src-b9f50bea0c513a6c3c6983e94d021ca40ea790aa.zip chromium_src-b9f50bea0c513a6c3c6983e94d021ca40ea790aa.tar.gz chromium_src-b9f50bea0c513a6c3c6983e94d021ca40ea790aa.tar.bz2 |
Remove the inconsistent group policy check in the installer.
Leave it to Google Update to decide how to interpret Group Policy
settings.
Also update the style of the InstallStatus enum so that
the values are explicit, thereby removing the need for
compile asserts.
BUG=none
Review URL: https://codereview.chromium.org/906433003
Cr-Commit-Position: refs/heads/master@{#316507}
Diffstat (limited to 'chrome/installer/setup')
-rw-r--r-- | chrome/installer/setup/setup_main.cc | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc index 6be142b..ea96967 100644 --- a/chrome/installer/setup/setup_main.cc +++ b/chrome/installer/setup/setup_main.cc @@ -293,83 +293,6 @@ installer::InstallStatus RenameChromeExecutables( return ret; } -// For each product that is being updated (i.e., already installed at an earlier -// version), see if that product has an update policy override that differs from -// that for the binaries. If any are found, fail with an error indicating that -// the Group Policy settings are in an inconsistent state. Do not do this test -// for same-version installs, since it would be unkind to block attempts to -// repair a corrupt installation. This function returns false when installation -// should be halted, in which case |status| contains the relevant exit code and -// the proper installer result has been written to the registry. -bool CheckGroupPolicySettings(const InstallationState& original_state, - const InstallerState& installer_state, - const Version& new_version, - installer::InstallStatus* status) { -#if !defined(GOOGLE_CHROME_BUILD) - // Chromium builds are not updated via Google Update, so there are no - // Group Policy settings to consult. - return true; -#else - DCHECK(status); - - // Single installs are always in good shape. - if (!installer_state.is_multi_install()) - return true; - - bool settings_are_valid = true; - const bool is_system_install = installer_state.system_install(); - BrowserDistribution* const binaries_dist = - installer_state.multi_package_binaries_distribution(); - - // Get the update policy for the binaries. - const GoogleUpdateSettings::UpdatePolicy binaries_policy = - GoogleUpdateSettings::GetAppUpdatePolicy(binaries_dist->GetAppGuid(), - NULL); - - // Check for differing update policies for all of the products being updated. - const Products& products = installer_state.products(); - Products::const_iterator scan = products.begin(); - for (Products::const_iterator end = products.end(); scan != end; ++scan) { - BrowserDistribution* dist = (*scan)->distribution(); - const ProductState* product_state = - original_state.GetProductState(is_system_install, dist->GetType()); - // Is an earlier version of this product already installed? - if (product_state != NULL && - product_state->version().CompareTo(new_version) < 0) { - bool is_overridden = false; - GoogleUpdateSettings::UpdatePolicy app_policy = - GoogleUpdateSettings::GetAppUpdatePolicy(dist->GetAppGuid(), - &is_overridden); - if (is_overridden && app_policy != binaries_policy) { - LOG(ERROR) << "Found legacy Group Policy setting for " - << dist->GetDisplayName() << " (value: " << app_policy - << ") that does not match the setting for " - << binaries_dist->GetDisplayName() - << " (value: " << binaries_policy << ")."; - settings_are_valid = false; - } - } - } - - if (!settings_are_valid) { - // TODO(grt): add " See http://goo.gl/+++ for details." to the end of this - // log message and to the IDS_INSTALL_INCONSISTENT_UPDATE_POLICY string once - // we have a help center article that explains why this error is being - // reported and how to resolve it. - LOG(ERROR) << "Cannot apply update on account of inconsistent " - "Google Update Group Policy settings. Use the Group Policy " - "Editor to set the update policy override for the " - << binaries_dist->GetDisplayName() - << " application and try again."; - *status = installer::INCONSISTENT_UPDATE_POLICY; - installer_state.WriteInstallerResult( - *status, IDS_INSTALL_INCONSISTENT_UPDATE_POLICY_BASE, NULL); - } - - return settings_are_valid; -#endif // defined(GOOGLE_CHROME_BUILD) -} - // If only the binaries are being updated, fail. // If any product is being installed in single-mode that already exists in // multi-mode, fail. @@ -1542,11 +1465,6 @@ InstallStatus InstallProductsHelper(const InstallationState& original_state, installer_state.WriteInstallerResult(install_status, message_id, NULL); } - proceed_with_installation = - proceed_with_installation && - CheckGroupPolicySettings(original_state, installer_state, - *installer_version, &install_status); - if (proceed_with_installation) { base::FilePath prefs_source_path(cmd_line.GetSwitchValueNative( switches::kInstallerData)); |