summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Charette <gab@chromium.org>2015-07-13 18:53:32 -0400
committerGabriel Charette <gab@chromium.org>2015-07-13 23:05:08 +0000
commit4339df4e46af5242eacc438fd8d205c47208cee9 (patch)
tree76fb2167ebe295d0ba8b8a585c516e9ab8162335
parent900f5c09799cc9a281879451b2d1eccc4c70bc31 (diff)
downloadchromium_src-4339df4e46af5242eacc438fd8d205c47208cee9.zip
chromium_src-4339df4e46af5242eacc438fd8d205c47208cee9.tar.gz
chromium_src-4339df4e46af5242eacc438fd8d205c47208cee9.tar.bz2
[Merge to M44] Make use of the new UpdateActiveSetupVersionWorkItem.
Sets up both: 1) Update only the major component of the Active Setup version on regular update. 2) Bump the OS_UPGRADES component of the Active Setup version on-os-upgrade. BUG=488247, 502363 Review URL: https://codereview.chromium.org/1223933005 Cr-Commit-Position: refs/heads/master@{#338554} (cherry picked from commit e7826864b2198b29f15de1b2f7a26198a7347649) TBR=grt@chromium.org Review URL: https://codereview.chromium.org/1232053004 . Cr-Commit-Position: refs/branch-heads/2403@{#507} Cr-Branched-From: f54b8097a9c45ed4ad308133d49f05325d6c5070-refs/heads/master@{#330231}
-rw-r--r--chrome/chrome_installer.gypi2
-rw-r--r--chrome/installer/setup/install.cc17
-rw-r--r--chrome/installer/setup/install_worker.cc15
3 files changed, 21 insertions, 13 deletions
diff --git a/chrome/chrome_installer.gypi b/chrome/chrome_installer.gypi
index 08a26e5..d7ef074 100644
--- a/chrome/chrome_installer.gypi
+++ b/chrome/chrome_installer.gypi
@@ -253,6 +253,8 @@
'installer/setup/setup_util.h',
'installer/setup/uninstall.cc',
'installer/setup/uninstall.h',
+ 'installer/setup/update_active_setup_version_work_item.cc',
+ 'installer/setup/update_active_setup_version_work_item.h',
],
'msvs_settings': {
'VCLinkerTool': {
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index 58272b7..409fa25 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -24,6 +24,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/installer/setup/install_worker.h"
#include "chrome/installer/setup/setup_constants.h"
+#include "chrome/installer/setup/update_active_setup_version_work_item.h"
#include "chrome/installer/util/auto_launch_util.h"
#include "chrome/installer/util/beacons.h"
#include "chrome/installer/util/browser_distribution.h"
@@ -628,8 +629,22 @@ void HandleOsUpgradeForBrowser(const installer::InstallerState& installer_state,
UpdateOsUpgradeBeacon(installer_state.system_install(),
BrowserDistribution::GetDistribution());
- if (!installer_state.system_install())
+
+ // Update the per-user default browser beacon. For user-level installs this
+ // can be done directly; whereas it requires triggering Active Setup for
+ // each user's subsequent login on system-level installs.
+ if (!installer_state.system_install()) {
UpdateDefaultBrowserBeaconForPath(chrome_exe);
+ } else {
+ UpdateActiveSetupVersionWorkItem active_setup_work_item(
+ InstallUtil::GetActiveSetupPath(chrome.distribution()),
+ UpdateActiveSetupVersionWorkItem::
+ UPDATE_AND_BUMP_OS_UPGRADES_COMPONENT);
+ if (active_setup_work_item.Do())
+ VLOG(1) << "Bumped Active Setup Version on-os-upgrade.";
+ else
+ LOG(ERROR) << "Failed to bump Active Setup Version on-os-upgrade.";
+ }
}
}
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc
index 7b40d98..a615696 100644
--- a/chrome/installer/setup/install_worker.cc
+++ b/chrome/installer/setup/install_worker.cc
@@ -32,6 +32,7 @@
#include "chrome/installer/setup/install.h"
#include "chrome/installer/setup/setup_constants.h"
#include "chrome/installer/setup/setup_util.h"
+#include "chrome/installer/setup/update_active_setup_version_work_item.h"
#include "chrome/installer/util/app_registration_data.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/callback_work_item.h"
@@ -57,12 +58,6 @@ namespace installer {
namespace {
-// The version identifying the work done by setup.exe --configure-user-settings
-// on user login by way of Active Setup. Increase this value if the work done
-// in setup_main.cc's handling of kConfigureUserSettings changes and should be
-// executed again for all users.
-const wchar_t kActiveSetupVersion[] = L"43,0,0,0";
-
// Although the UUID of the ChromeFrame class is used for the "current" value,
// this is done only as a convenience; there is no need for the GUID of the Low
// Rights policies to match the ChromeFrame class's GUID. Hence, it is safe to
@@ -1458,12 +1453,8 @@ void AddActiveSetupWorkItems(const InstallerState& installer_state,
static_cast<DWORD>(1U),
true);
- list->AddSetRegValueWorkItem(root,
- active_setup_path,
- WorkItem::kWow64Default,
- L"Version",
- kActiveSetupVersion,
- true);
+ list->AddWorkItem(new UpdateActiveSetupVersionWorkItem(
+ active_setup_path, UpdateActiveSetupVersionWorkItem::UPDATE));
}
void AddDeleteOldIELowRightsPolicyWorkItems(