Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4283)

Unified Diff: chrome/installer/setup/install_worker.cc

Issue 10806086: Fix multi-install update regression. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed review comments Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/install_worker.cc
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc
index f0b92d8f8926b78460c94b2543e635557bb6be66..2da25ce2f34204f7ff5a148d49512004bad0f6c0 100644
--- a/chrome/installer/setup/install_worker.cc
+++ b/chrome/installer/setup/install_worker.cc
@@ -382,6 +382,8 @@ void AddEulaAcceptedWorkItems(const InstallationState& original_state,
DWORD eula_accepted;
const Products& products = installer_state.products();
for (size_t i = 0, count = products.size(); i != count; ++i) {
+ if (products[i]->is_chrome_binaries())
+ continue;
DWORD dword_value = 0;
BrowserDistribution::Type this_type =
products[i]->distribution()->GetType();
@@ -636,35 +638,18 @@ bool AppendPostInstallTasks(const InstallerState& installer_state,
google_update::kRegCriticalVersionField);
}
- // Adding this registry entry for all products is overkill.
- // However, as it stands, we don't have a way to know which distribution
- // will check the key and run the command, so we add it for all. The
- // first to run it will perform the operation and clean up the other
+ // Adding this registry entry for all products (but the binaries) is
+ // overkill. However, as it stands, we don't have a way to know which
+ // product will check the key and run the command, so we add it for all.
+ // The first to run it will perform the operation and clean up the other
// values.
- CommandLine product_rename_cmd(rename);
- products[i]->AppendRenameFlags(&product_rename_cmd);
- in_use_update_work_items->AddSetRegValueWorkItem(
- root, version_key, google_update::kRegRenameCmdField,
- product_rename_cmd.GetCommandLineString(), true);
- }
-
- if (current_version != NULL && installer_state.is_multi_install()) {
- BrowserDistribution* dist =
- installer_state.multi_package_binaries_distribution();
- version_key = dist->GetVersionKey();
- in_use_update_work_items->AddSetRegValueWorkItem(
- root, version_key, google_update::kRegOldVersionField,
- ASCIIToWide(current_version->GetString()), true);
- if (critical_version.IsValid()) {
+ if (dist->GetType() != BrowserDistribution::CHROME_BINARIES) {
+ CommandLine product_rename_cmd(rename);
+ products[i]->AppendRenameFlags(&product_rename_cmd);
in_use_update_work_items->AddSetRegValueWorkItem(
- root, version_key, google_update::kRegCriticalVersionField,
- ASCIIToWide(critical_version.GetString()), true);
- } else {
- in_use_update_work_items->AddDeleteRegValueWorkItem(
- root, version_key, google_update::kRegCriticalVersionField);
+ root, version_key, google_update::kRegRenameCmdField,
+ product_rename_cmd.GetCommandLineString(), true);
}
- // TODO(tommi): We should move the rename command here. We also need to
- // update upgrade_utils::SwapNewChromeExeIfPresent.
}
if (installer_state.FindProduct(BrowserDistribution::CHROME_FRAME)) {
@@ -717,14 +702,11 @@ bool AppendPostInstallTasks(const InstallerState& installer_state,
// Make a best-effort attempt to delete any shortcuts left over from
// previous non-MSI installations for the same type of install (system or
// per user).
- AddDeleteUninstallShortcutsForMSIWorkItems(installer_state, *product,
- temp_path,
- post_install_task_list);
- }
- if (installer_state.is_multi_install()) {
- AddSetMsiMarkerWorkItem(installer_state,
- installer_state.multi_package_binaries_distribution(), true,
- post_install_task_list);
+ if (product->ShouldCreateUninstallEntry()) {
+ AddDeleteUninstallShortcutsForMSIWorkItems(installer_state, *product,
+ temp_path,
+ post_install_task_list);
+ }
}
}
« no previous file with comments | « no previous file | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698