summaryrefslogtreecommitdiffstats
path: root/chrome/installer/setup/main.cc
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-08 21:29:05 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-08 21:29:05 +0000
commitf460cc8c601dc33138e32a94a2285ab9c587a7a0 (patch)
treee968ce24a150bd32f405f90166227bab753d7abd /chrome/installer/setup/main.cc
parent7045a47af50dce28324cf4a19eda30d91ef94695 (diff)
downloadchromium_src-f460cc8c601dc33138e32a94a2285ab9c587a7a0.zip
chromium_src-f460cc8c601dc33138e32a94a2285ab9c587a7a0.tar.gz
chromium_src-f460cc8c601dc33138e32a94a2285ab9c587a7a0.tar.bz2
Reuse a method that will be required for criteria checker as well.
Review URL: http://codereview.chromium.org/6587 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3056 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup/main.cc')
-rw-r--r--chrome/installer/setup/main.cc28
1 files changed, 1 insertions, 27 deletions
diff --git a/chrome/installer/setup/main.cc b/chrome/installer/setup/main.cc
index 9714f68..f9bf767 100644
--- a/chrome/installer/setup/main.cc
+++ b/chrome/installer/setup/main.cc
@@ -30,32 +30,6 @@
namespace {
-// Checks if the current system is running Windows XP or later. We are not
-// supporting Windows 2K for beta release.
-bool IsWindowsXPorLater() {
- OSVERSIONINFOEX osvi;
- ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
- GetVersionEx((OSVERSIONINFO *) &osvi);
-
- // Windows versioning scheme doesn't seem very clear but here is what
- // the code is checking as the minimum version required for Chrome:
- // * Major > 5 is Vista or later so no further checks for Service Pack
- // * Major = 5 && Minor > 1 is Windows Server 2003 so again no SP checks
- // * Major = 5 && Minor = 1 is WinXP so check for SP1 or later
- LOG(INFO) << "Windows Version: Major - " << osvi.dwMajorVersion
- << " Minor - " << osvi.dwMinorVersion
- << " Service Pack Major - " << osvi.wServicePackMajor
- << " Service Pack Minor - " << osvi.wServicePackMinor;
- if ((osvi.dwMajorVersion > 5) || // Vista or later
- ((osvi.dwMajorVersion == 5) && (osvi.dwMinorVersion > 1)) || // Win 2003
- ((osvi.dwMajorVersion == 5) && (osvi.dwMinorVersion == 1) &&
- (osvi.wServicePackMajor >= 1))) { // WinXP with SP1
- return true;
- }
- return false;
-}
-
// Applies a binary patch to existing Chrome installer archive on the system.
// Uses bspatch library.
int PatchArchiveFile(bool system_install, const std::wstring& archive_path,
@@ -304,7 +278,7 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
// Check to make sure current system is WinXP or later. If not, log
// error message and get out.
- if (!IsWindowsXPorLater()) {
+ if (!InstallUtil::IsOSSupported()) {
LOG(ERROR) << "Chrome only supports Windows XP or later.";
return installer_util::OS_NOT_SUPPORTED;
}