| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/installer/util/install_util.h" | 8 #include "chrome/installer/util/install_util.h" |
| 9 | 9 |
| 10 #include <shellapi.h> | 10 #include <shellapi.h> |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 << " found " << version_str; | 264 << " found " << version_str; |
| 265 *version = Version(base::UTF16ToASCII(version_str)); | 265 *version = Version(base::UTF16ToASCII(version_str)); |
| 266 } else { | 266 } else { |
| 267 DCHECK_EQ(ERROR_FILE_NOT_FOUND, result); | 267 DCHECK_EQ(ERROR_FILE_NOT_FOUND, result); |
| 268 VLOG(1) << "No existing " << dist->GetDisplayName() | 268 VLOG(1) << "No existing " << dist->GetDisplayName() |
| 269 << " install found."; | 269 << " install found."; |
| 270 } | 270 } |
| 271 } | 271 } |
| 272 | 272 |
| 273 bool InstallUtil::IsOSSupported() { | 273 bool InstallUtil::IsOSSupported() { |
| 274 // We do not support Win2K or older, or XP without service pack 2. | 274 // We do not support anything prior to Windows 7. |
| 275 VLOG(1) << base::SysInfo::OperatingSystemName() << ' ' | 275 VLOG(1) << base::SysInfo::OperatingSystemName() << ' ' |
| 276 << base::SysInfo::OperatingSystemVersion(); | 276 << base::SysInfo::OperatingSystemVersion(); |
| 277 base::win::Version version = base::win::GetVersion(); | 277 return base::win::GetVersion() >= base::win::VERSION_WIN7; |
| 278 return (version > base::win::VERSION_XP) || | |
| 279 ((version == base::win::VERSION_XP) && | |
| 280 (base::win::OSInfo::GetInstance()->service_pack().major >= 2)); | |
| 281 } | 278 } |
| 282 | 279 |
| 283 void InstallUtil::AddInstallerResultItems( | 280 void InstallUtil::AddInstallerResultItems( |
| 284 bool system_install, | 281 bool system_install, |
| 285 const base::string16& state_key, | 282 const base::string16& state_key, |
| 286 installer::InstallStatus status, | 283 installer::InstallStatus status, |
| 287 int string_resource_id, | 284 int string_resource_id, |
| 288 const base::string16* const launch_cmd, | 285 const base::string16* const launch_cmd, |
| 289 WorkItemList* install_list) { | 286 WorkItemList* install_list) { |
| 290 DCHECK(install_list); | 287 DCHECK(install_list); |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 // Open the program and see if it references the expected file. | 669 // Open the program and see if it references the expected file. |
| 673 base::File file; | 670 base::File file; |
| 674 BY_HANDLE_FILE_INFORMATION info = {}; | 671 BY_HANDLE_FILE_INFORMATION info = {}; |
| 675 | 672 |
| 676 return (OpenForInfo(path, &file) && | 673 return (OpenForInfo(path, &file) && |
| 677 GetInfo(file, &info) && | 674 GetInfo(file, &info) && |
| 678 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && | 675 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && |
| 679 info.nFileIndexHigh == file_info_.nFileIndexHigh && | 676 info.nFileIndexHigh == file_info_.nFileIndexHigh && |
| 680 info.nFileIndexLow == file_info_.nFileIndexLow); | 677 info.nFileIndexLow == file_info_.nFileIndexLow); |
| 681 } | 678 } |
| OLD | NEW |