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

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

Issue 7087030: Upgrade all multi-install products present on the system when the installer is run with only the ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 | « chrome/app/google_chrome_strings.grd ('k') | chrome/installer/util/prebuild/create_string_rc.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/setup_main.cc
===================================================================
--- chrome/installer/setup/setup_main.cc (revision 87235)
+++ chrome/installer/setup/setup_main.cc (working copy)
@@ -148,7 +148,7 @@
InstallerState* installer_state) {
if (installer_state->is_multi_install()) {
// TODO(grt): Find all occurrences of such arrays and generalize/centralize.
- BrowserDistribution::Type product_checks[] = {
+ static const BrowserDistribution::Type product_checks[] = {
BrowserDistribution::CHROME_BROWSER,
BrowserDistribution::CHROME_FRAME
};
@@ -366,8 +366,20 @@
bool CheckPreInstallConditions(const InstallationState& original_state,
InstallerState* installer_state,
installer::InstallStatus* status) {
+ // See what products are already installed in multi mode. When we do multi
+ // installs, we must upgrade all installations since they share the binaries.
+ AddExistingMultiInstalls(original_state, installer_state);
robertshield 2011/05/31 15:30:19 Nice fix :)
+
const Products& products = installer_state->products();
- DCHECK(products.size());
+ if (products.empty()) {
+ // We haven't been given any products on which to operate.
+ LOG(ERROR)
+ << "Not given any products to install and no products found to update.";
+ *status = installer::CHROME_NOT_INSTALLED;
+ installer_state->WriteInstallerResult(*status,
+ IDS_INSTALL_NO_PRODUCTS_TO_UPDATE_BASE, NULL);
+ return false;
+ }
if (!CheckMultiInstallConditions(original_state, installer_state, status))
return false;
@@ -436,10 +448,6 @@
}
}
- // See what products are already installed in multi mode. When we do multi
- // installs, we must upgrade all installations since they share the binaries.
- AddExistingMultiInstalls(original_state, installer_state);
-
// If no previous installation of Chrome, make sure installation directory
// either does not exist or can be deleted (i.e. is not locked by some other
// process).
@@ -678,6 +686,7 @@
->UpdateInstallStatus(system_install, archive_type, install_status);
if (CheckPreInstallConditions(original_state, installer_state,
&install_status)) {
+ VLOG(1) << "Installing to " << installer_state->target_path().value();
install_status = InstallProductsHelper(
original_state, cmd_line, prefs, *installer_state, &archive_type);
}
@@ -1169,7 +1178,6 @@
}
} else {
// If --uninstall option is not specified, we assume it is install case.
- VLOG(1) << "Installing to " << installer_state.target_path().value();
install_status = InstallProducts(original_state, cmd_line, prefs,
&installer_state);
}
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | chrome/installer/util/prebuild/create_string_rc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698