summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/chromium_strings.grd3
-rw-r--r--chrome/app/google_chrome_strings.grd3
-rw-r--r--chrome/installer/setup/setup_main.cc22
-rwxr-xr-xchrome/installer/util/prebuild/create_string_rc.py3
4 files changed, 23 insertions, 8 deletions
diff --git a/chrome/app/chromium_strings.grd b/chrome/app/chromium_strings.grd
index c8196a8..0c614f0 100644
--- a/chrome/app/chromium_strings.grd
+++ b/chrome/app/chromium_strings.grd
@@ -433,6 +433,9 @@ be available for now. -->
<message name="IDS_INSTALL_INSUFFICIENT_RIGHTS" desc="Error displayed when a non admin user tries to attempt system level install/uninstall.">
You do not have appropriate rights for system-level install. Try running the installer again as Administrator.
</message>
+ <message name="IDS_INSTALL_NO_PRODUCTS_TO_UPDATE" desc="Error displayed if the installer is not provided one or more products to install/update.">
+ No installation of Chromium or Chromium Frame found to update.
+ </message>
<message name="IDS_INSTALL_APP_CONFLICT" desc="Error displayed if installation fails due to another existing application.">
A conflict with another installed application has been detected.
</message>
diff --git a/chrome/app/google_chrome_strings.grd b/chrome/app/google_chrome_strings.grd
index 83477dc..e4d2e30 100644
--- a/chrome/app/google_chrome_strings.grd
+++ b/chrome/app/google_chrome_strings.grd
@@ -431,6 +431,9 @@ Chrome supports. -->
<message name="IDS_INSTALL_INSUFFICIENT_RIGHTS" desc="Error displayed when a non admin user tries to attempt system level install/uninstall.">
You do not have appropriate rights for system-level install. Try running the installer again as Administrator.
</message>
+ <message name="IDS_INSTALL_NO_PRODUCTS_TO_UPDATE" desc="Error displayed if the installer is not provided one or more products to install/update.">
+ No installation of Google Chrome or Google Chrome Frame found to update.
+ </message>
<message name="IDS_INSTALL_APP_CONFLICT" desc="Error displayed if installation fails due to another existing application.">
A conflict with another installed application has been detected.
</message>
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index 58a40b9..8c25613 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -148,7 +148,7 @@ void AddExistingMultiInstalls(const InstallationState& original_state,
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 CheckMultiInstallConditions(const InstallationState& original_state,
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);
+
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 @@ bool CheckPreInstallConditions(const InstallationState& original_state,
}
}
- // 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 @@ installer::InstallStatus InstallProducts(
->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 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
}
} 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);
}
diff --git a/chrome/installer/util/prebuild/create_string_rc.py b/chrome/installer/util/prebuild/create_string_rc.py
index 00872bf..3a0e14f 100755
--- a/chrome/installer/util/prebuild/create_string_rc.py
+++ b/chrome/installer/util/prebuild/create_string_rc.py
@@ -1,5 +1,5 @@
#!/usr/bin/python
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -61,6 +61,7 @@ kStringIds = [
'IDS_INSTALL_UNCOMPRESSION_FAILED',
'IDS_INSTALL_INVALID_ARCHIVE',
'IDS_INSTALL_INSUFFICIENT_RIGHTS',
+ 'IDS_INSTALL_NO_PRODUCTS_TO_UPDATE',
'IDS_UNINSTALL_FAILED',
'IDS_UNINSTALL_COMPLETE',
'IDS_INSTALL_DIR_IN_USE',