diff options
-rw-r--r-- | chrome/installer/setup/install_worker.cc | 4 | ||||
-rw-r--r-- | chrome/installer/setup/install_worker_unittest.cc | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc index 7105590..73fb098 100644 --- a/chrome/installer/setup/install_worker.cc +++ b/chrome/installer/setup/install_worker.cc @@ -469,9 +469,11 @@ void AddUsageStatsWorkItems(const InstallationState& original_state, std::wstring state_key( installer_state.multi_package_binaries_distribution()->GetStateKey()); install_list->AddCreateRegKeyWorkItem(root_key, state_key); + // Overwrite any existing value so that overinstalls (where Omaha writes a + // new value into a product's state key) pick up the correct value. install_list->AddSetRegValueWorkItem(root_key, state_key, google_update::kRegUsageStatsField, - usagestats, false); + usagestats, true); for (Products::const_iterator scan = products.begin(), end = products.end(); scan != end; ++scan) { diff --git a/chrome/installer/setup/install_worker_unittest.cc b/chrome/installer/setup/install_worker_unittest.cc index e5936df..a683b0c 100644 --- a/chrome/installer/setup/install_worker_unittest.cc +++ b/chrome/installer/setup/install_worker_unittest.cc @@ -598,7 +598,7 @@ TEST_F(InstallWorkerTest, AddUsageStatsWorkItems) { HasSubstr(multi_app_guid), StrEq(google_update::kRegUsageStatsField), Eq(static_cast<DWORD>(1)), - _)).Times(1); + Eq(true))).Times(1); // Expect to see some values cleaned up from Chrome's keys. BrowserDistribution* chrome_dist = @@ -624,7 +624,8 @@ TEST_F(InstallWorkerTest, AddUsageStatsWorkItems) { AddUsageStatsWorkItems(*installation_state.get(), *installer_state.get(), - &work_item_list);} + &work_item_list); +} // The Quick Enable tests only make sense for the Google Chrome build as it // interacts with registry values that are specific to Google Update. |