summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-22 00:41:57 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-22 00:41:57 +0000
commit6315b5922be644320780b96fca9ffd1050dc1a38 (patch)
tree9d5a1a3cba01c3a02ee3b0957a25a65a7ce8bf8f /chrome/installer
parent794c3bbd6ccf58b41be676607555b02cfacc71e3 (diff)
downloadchromium_src-6315b5922be644320780b96fca9ffd1050dc1a38.zip
chromium_src-6315b5922be644320780b96fca9ffd1050dc1a38.tar.gz
chromium_src-6315b5922be644320780b96fca9ffd1050dc1a38.tar.bz2
* Fix system level check. We should check for mode conflict when we are doing an install and not for uninstall.
BUG=4651 Review URL: http://codereview.chromium.org/11365 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5883 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rwxr-xr-xchrome/installer/setup/main.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/chrome/installer/setup/main.cc b/chrome/installer/setup/main.cc
index f89bb29..0a1ebc3 100755
--- a/chrome/installer/setup/main.cc
+++ b/chrome/installer/setup/main.cc
@@ -465,21 +465,6 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
return installer_util::OS_ERROR;
}
- // Check to avoid simultaneous per-user and per-machine installs.
- scoped_ptr<installer::Version>
- chrome_version(InstallUtil::GetChromeVersion(!system_install));
- if (chrome_version.get()) {
- LOG(ERROR) << "Already installed version " << chrome_version->GetString()
- << " conflicts with the current install mode.";
- installer_util::InstallStatus status = system_install ?
- installer_util::USER_LEVEL_INSTALL_EXISTS :
- installer_util::SYSTEM_LEVEL_INSTALL_EXISTS;
- int str_id = system_install ? IDS_INSTALL_USER_LEVEL_EXISTS_BASE :
- IDS_INSTALL_SYSTEM_LEVEL_EXISTS_BASE;
- InstallUtil::WriteInstallerResult(system_install, status, str_id, NULL);
- return status;
- }
-
// If --register-chrome-browser option is specified, register all
// Chrome protocol/file associations as well as register it as a valid
// browser for StarMenu->Internet shortcut. This option should only
@@ -522,6 +507,21 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
system_install);
// If --uninstall option is not specified, we assume it is install case.
} else {
+ // Check to avoid simultaneous per-user and per-machine installs.
+ scoped_ptr<installer::Version>
+ chrome_version(InstallUtil::GetChromeVersion(!system_install));
+ if (chrome_version.get()) {
+ LOG(ERROR) << "Already installed version " << chrome_version->GetString()
+ << " conflicts with the current install mode.";
+ installer_util::InstallStatus status = system_install ?
+ installer_util::USER_LEVEL_INSTALL_EXISTS :
+ installer_util::SYSTEM_LEVEL_INSTALL_EXISTS;
+ int str_id = system_install ? IDS_INSTALL_USER_LEVEL_EXISTS_BASE :
+ IDS_INSTALL_SYSTEM_LEVEL_EXISTS_BASE;
+ InstallUtil::WriteInstallerResult(system_install, status, str_id, NULL);
+ return status;
+ }
+
install_status = InstallChrome(parsed_command_line,
installed_version.get(),
options);