| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // See the corresponding header file for description of the functions in this | 5 // See the corresponding header file for description of the functions in this |
| 6 // file. | 6 // file. |
| 7 | 7 |
| 8 #include "install_util.h" | 8 #include "install_util.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 bool InstallUtil::IsOSSupported() { | 73 bool InstallUtil::IsOSSupported() { |
| 74 int major, minor; | 74 int major, minor; |
| 75 win_util::WinVersion version = win_util::GetWinVersion(); | 75 win_util::WinVersion version = win_util::GetWinVersion(); |
| 76 win_util::GetServicePackLevel(&major, &minor); | 76 win_util::GetServicePackLevel(&major, &minor); |
| 77 | 77 |
| 78 // We do not support Win2K or older, or XP without service pack 1. | 78 // We do not support Win2K or older, or XP without service pack 1. |
| 79 LOG(INFO) << "Windows Version: " << version | 79 LOG(INFO) << "Windows Version: " << version |
| 80 << ", Service Pack: " << major << "." << minor; | 80 << ", Service Pack: " << major << "." << minor; |
| 81 if ((version == win_util::WINVERSION_VISTA) || | 81 if ((version > win_util::WINVERSION_XP) || |
| 82 (version == win_util::WINVERSION_SERVER_2003) || | |
| 83 (version == win_util::WINVERSION_XP && major >= 1)) { | 82 (version == win_util::WINVERSION_XP && major >= 1)) { |
| 84 return true; | 83 return true; |
| 85 } | 84 } |
| 86 return false; | 85 return false; |
| 87 } | 86 } |
| 88 | 87 |
| 89 void InstallUtil::WriteInstallerResult(bool system_install, | 88 void InstallUtil::WriteInstallerResult(bool system_install, |
| 90 installer_util::InstallStatus status, | 89 installer_util::InstallStatus status, |
| 91 int string_resource_id, | 90 int string_resource_id, |
| 92 const std::wstring* const launch_cmd) { | 91 const std::wstring* const launch_cmd) { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 118 | 117 |
| 119 wchar_t program_files_path[MAX_PATH] = {0}; | 118 wchar_t program_files_path[MAX_PATH] = {0}; |
| 120 if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, | 119 if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, |
| 121 SHGFP_TYPE_CURRENT, program_files_path))) { | 120 SHGFP_TYPE_CURRENT, program_files_path))) { |
| 122 return !StartsWith(exe_path, program_files_path, false); | 121 return !StartsWith(exe_path, program_files_path, false); |
| 123 } else { | 122 } else { |
| 124 NOTREACHED(); | 123 NOTREACHED(); |
| 125 } | 124 } |
| 126 return true; | 125 return true; |
| 127 } | 126 } |
| OLD | NEW |