Chromium Code Reviews| 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 #include "chrome/installer/setup/setup_main.h" | 5 #include "chrome/installer/setup/setup_main.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <msi.h> | 8 #include <msi.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #include <shlobj.h> | 10 #include <shlobj.h> |
| (...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1726 installer::SetCrashKeysFromCommandLine(cmd_line); | 1726 installer::SetCrashKeysFromCommandLine(cmd_line); |
| 1727 | 1727 |
| 1728 // Make sure the process exits cleanly on unexpected errors. | 1728 // Make sure the process exits cleanly on unexpected errors. |
| 1729 base::EnableTerminationOnHeapCorruption(); | 1729 base::EnableTerminationOnHeapCorruption(); |
| 1730 base::EnableTerminationOnOutOfMemory(); | 1730 base::EnableTerminationOnOutOfMemory(); |
| 1731 base::win::RegisterInvalidParamHandler(); | 1731 base::win::RegisterInvalidParamHandler(); |
| 1732 base::win::SetupCRT(cmd_line); | 1732 base::win::SetupCRT(cmd_line); |
| 1733 | 1733 |
| 1734 const bool is_uninstall = cmd_line.HasSwitch(installer::switches::kUninstall); | 1734 const bool is_uninstall = cmd_line.HasSwitch(installer::switches::kUninstall); |
| 1735 | 1735 |
| 1736 // Check to make sure current system is WinXP or later. If not, log | 1736 // Check to make sure current system is Win7 or later. If not, log |
| 1737 // error message and get out. | 1737 // error message and get out. |
| 1738 if (!InstallUtil::IsOSSupported()) { | 1738 if (!InstallUtil::IsOSSupported()) { |
| 1739 LOG(ERROR) << "Chrome only supports Windows XP or later."; | 1739 LOG(ERROR) << "Chrome only supports Windows 7 or later."; |
|
scottmg
2016/04/12 17:32:39
Does setup still launch on XP even?
grt (UTC plus 2)
2016/04/12 17:58:23
Just tried with 50.0.2661.74, and it succeeded in
| |
| 1740 installer_state.WriteInstallerResult( | 1740 installer_state.WriteInstallerResult( |
| 1741 installer::OS_NOT_SUPPORTED, IDS_INSTALL_OS_NOT_SUPPORTED_BASE, NULL); | 1741 installer::OS_NOT_SUPPORTED, IDS_INSTALL_OS_NOT_SUPPORTED_BASE, NULL); |
| 1742 return installer::OS_NOT_SUPPORTED; | 1742 return installer::OS_NOT_SUPPORTED; |
| 1743 } | 1743 } |
| 1744 | 1744 |
| 1745 // Initialize COM for use later. | 1745 // Initialize COM for use later. |
| 1746 base::win::ScopedCOMInitializer com_initializer; | 1746 base::win::ScopedCOMInitializer com_initializer; |
| 1747 if (!com_initializer.succeeded()) { | 1747 if (!com_initializer.succeeded()) { |
| 1748 installer_state.WriteInstallerResult( | 1748 installer_state.WriteInstallerResult( |
| 1749 installer::OS_ERROR, IDS_INSTALL_OS_ERROR_BASE, NULL); | 1749 installer::OS_ERROR, IDS_INSTALL_OS_ERROR_BASE, NULL); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1847 // to pass through, since this is only returned on uninstall which is | 1847 // to pass through, since this is only returned on uninstall which is |
| 1848 // never invoked directly by Google Update. | 1848 // never invoked directly by Google Update. |
| 1849 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1849 return_code = InstallUtil::GetInstallReturnCode(install_status); |
| 1850 } | 1850 } |
| 1851 | 1851 |
| 1852 installer::EndPersistentHistogramStorage(installer_state.target_path()); | 1852 installer::EndPersistentHistogramStorage(installer_state.target_path()); |
| 1853 VLOG(1) << "Installation complete, returning: " << return_code; | 1853 VLOG(1) << "Installation complete, returning: " << return_code; |
| 1854 | 1854 |
| 1855 return return_code; | 1855 return return_code; |
| 1856 } | 1856 } |
| OLD | NEW |