summaryrefslogtreecommitdiffstats
path: root/chrome/installer/setup
diff options
context:
space:
mode:
authorgab <gab@chromium.org>2015-07-13 12:59:37 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-13 20:00:25 +0000
commite7826864b2198b29f15de1b2f7a26198a7347649 (patch)
tree83d0f7e176fdaf5ced4d4d9d5ca40851c3c41776 /chrome/installer/setup
parentdb63904ab567209e4318a81d440f183686418b77 (diff)
downloadchromium_src-e7826864b2198b29f15de1b2f7a26198a7347649.zip
chromium_src-e7826864b2198b29f15de1b2f7a26198a7347649.tar.gz
chromium_src-e7826864b2198b29f15de1b2f7a26198a7347649.tar.bz2
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}
Diffstat (limited to 'chrome/installer/setup')
-rw-r--r--chrome/installer/setup/install.cc17
-rw-r--r--chrome/installer/setup/install_worker.cc15
2 files changed, 19 insertions, 13 deletions
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 1f2e966..d8376cc 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
@@ -1457,12 +1452,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(