summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-13 17:43:23 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-13 17:43:23 +0000
commit96ef99c095036ec343f5706ca557767fb1c285e5 (patch)
tree87c48af50fff6337adf1a35a8eda6c0753445245 /chrome/installer/util
parent9c118535d6031180bf1a6148f94ddb0d2de4833c (diff)
downloadchromium_src-96ef99c095036ec343f5706ca557767fb1c285e5.zip
chromium_src-96ef99c095036ec343f5706ca557767fb1c285e5.tar.gz
chromium_src-96ef99c095036ec343f5706ca557767fb1c285e5.tar.bz2
Display proper error message at couple of places during installation.
* If Chrome is used to download and install the same version of Chrome, it should display that the current version is in use. * When Chrome gets updated while it is running, there is no reason to launch Chrome (as it would still be old version), so do not write the launch command to registry. * Remove the case of HIGHER_VERSION_EXISTS as a successful install. Not sure why it was marked as successful install. * Remove the code to remove ChromeExt registry keys as this has already been pushed to the channels that had it in the first place. * Move the code to convert install_status into boolean (1 or 0) in Chromium distribution class. BUG=19459, 25534 TEST= 1) Install Chrome, and keep it running. 2) Try to install the same version again and check the error message in the registry. 3) Try to install a higher version and make launch command doesn't get written to the registry. Review URL: http://codereview.chromium.org/541002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36133 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util')
-rw-r--r--chrome/installer/util/browser_distribution.cc12
-rw-r--r--chrome/installer/util/chrome_frame_distribution.cc13
-rw-r--r--chrome/installer/util/chrome_frame_distribution.h2
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc13
-rw-r--r--chrome/installer/util/google_chrome_distribution.h3
-rw-r--r--chrome/installer/util/install_util.cc2
-rwxr-xr-xchrome/installer/util/prebuild/create_string_rc.py1
-rw-r--r--chrome/installer/util/util_constants.h4
8 files changed, 15 insertions, 35 deletions
diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc
index b3d0cdd..74c735b 100644
--- a/chrome/installer/util/browser_distribution.cc
+++ b/chrome/installer/util/browser_distribution.cc
@@ -78,8 +78,16 @@ std::wstring BrowserDistribution::GetLongAppDescription() {
}
int BrowserDistribution::GetInstallReturnCode(
- installer_util::InstallStatus install_status) {
- return install_status;
+ installer_util::InstallStatus status) {
+ switch (status) {
+ case installer_util::FIRST_INSTALL_SUCCESS:
+ case installer_util::INSTALL_REPAIRED:
+ case installer_util::NEW_VERSION_UPDATED:
+ case installer_util::IN_USE_UPDATED:
+ return 0;
+ default:
+ return status;
+ }
}
std::string BrowserDistribution::GetSafeBrowsingName() {
diff --git a/chrome/installer/util/chrome_frame_distribution.cc b/chrome/installer/util/chrome_frame_distribution.cc
index 20ba51b..2b336fe 100644
--- a/chrome/installer/util/chrome_frame_distribution.cc
+++ b/chrome/installer/util/chrome_frame_distribution.cc
@@ -96,19 +96,6 @@ std::wstring ChromeFrameDistribution::GetVersionKey() {
return key;
}
-int ChromeFrameDistribution::GetInstallReturnCode(
- installer_util::InstallStatus status) {
- switch (status) {
- case installer_util::FIRST_INSTALL_SUCCESS:
- case installer_util::INSTALL_REPAIRED:
- case installer_util::NEW_VERSION_UPDATED:
- case installer_util::HIGHER_VERSION_EXISTS:
- return 0; // For Google Update's benefit we need to return 0 for success
- default:
- return status;
- }
-}
-
void ChromeFrameDistribution::UpdateDiffInstallStatus(bool system_install,
bool incremental_install, installer_util::InstallStatus install_status) {
HKEY reg_root = (system_install) ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
diff --git a/chrome/installer/util/chrome_frame_distribution.h b/chrome/installer/util/chrome_frame_distribution.h
index c58cbbe..f7bcce3 100644
--- a/chrome/installer/util/chrome_frame_distribution.h
+++ b/chrome/installer/util/chrome_frame_distribution.h
@@ -43,8 +43,6 @@ class ChromeFrameDistribution : public BrowserDistribution {
virtual std::wstring GetVersionKey();
- virtual int GetInstallReturnCode(installer_util::InstallStatus status);
-
// This is the point at which the Google Chrome installer removes the Google
// Update ap value. We implement this simply to have the same behaviour re.
// the ap value.
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index 64816ee..3222501 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -299,19 +299,6 @@ std::wstring GoogleChromeDistribution::GetAppDescription() {
return app_description;
}
-int GoogleChromeDistribution::GetInstallReturnCode(
- installer_util::InstallStatus status) {
- switch (status) {
- case installer_util::FIRST_INSTALL_SUCCESS:
- case installer_util::INSTALL_REPAIRED:
- case installer_util::NEW_VERSION_UPDATED:
- case installer_util::HIGHER_VERSION_EXISTS:
- return 0; // For Google Update's benefit we need to return 0 for success
- default:
- return status;
- }
-}
-
std::string GoogleChromeDistribution::GetSafeBrowsingName() {
return "googlechrome";
}
diff --git a/chrome/installer/util/google_chrome_distribution.h b/chrome/installer/util/google_chrome_distribution.h
index 7aa265f..7490a05 100644
--- a/chrome/installer/util/google_chrome_distribution.h
+++ b/chrome/installer/util/google_chrome_distribution.h
@@ -57,9 +57,6 @@ class GoogleChromeDistribution : public BrowserDistribution {
virtual std::wstring GetAppDescription();
- virtual int GetInstallReturnCode(
- installer_util::InstallStatus install_status);
-
virtual std::string GetSafeBrowsingName();
virtual std::wstring GetStateKey();
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index 25f3046b..a6114e5 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -110,7 +110,7 @@ void InstallUtil::WriteInstallerResult(bool system_install,
install_list->AddSetRegValueWorkItem(root, key, L"InstallerResultUIString",
msg, true);
}
- if (launch_cmd != NULL) {
+ if (launch_cmd != NULL && !launch_cmd->empty()) {
install_list->AddSetRegValueWorkItem(root, key,
L"InstallerSuccessLaunchCmdLine",
*launch_cmd, true);
diff --git a/chrome/installer/util/prebuild/create_string_rc.py b/chrome/installer/util/prebuild/create_string_rc.py
index e3ccdb5..5433029 100755
--- a/chrome/installer/util/prebuild/create_string_rc.py
+++ b/chrome/installer/util/prebuild/create_string_rc.py
@@ -49,6 +49,7 @@ kStringIds = [
'IDS_INSTALL_USER_LEVEL_EXISTS',
'IDS_INSTALL_SYSTEM_LEVEL_EXISTS',
'IDS_INSTALL_FAILED',
+ 'IDS_SAME_VERSION_REPAIR_FAILED',
'IDS_SETUP_PATCH_FAILED',
'IDS_INSTALL_OS_NOT_SUPPORTED',
'IDS_INSTALL_OS_ERROR',
diff --git a/chrome/installer/util/util_constants.h b/chrome/installer/util/util_constants.h
index d781be2..f510cdc 100644
--- a/chrome/installer/util/util_constants.h
+++ b/chrome/installer/util/util_constants.h
@@ -40,7 +40,9 @@ enum InstallStatus {
EULA_ACCEPTED, // EULA dialog was accepted by user.
EULA_ACCEPTED_OPT_IN, // EULA accepted wtih the crash optin selected.
INSTALL_DIR_IN_USE, // Installation directory is in use by another process
- UNINSTALL_REQUIRES_REBOOT // Uninstallation required a reboot.
+ UNINSTALL_REQUIRES_REBOOT, // Uninstallation required a reboot.
+ IN_USE_UPDATED, // Chrome successfully updated but old version running
+ SAME_VERSION_REPAIR_FAILED // Chrome repair failed as Chrome was running
};
namespace switches {