| 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 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1690 installer::SetCrashKeysFromCommandLine(cmd_line); | 1690 installer::SetCrashKeysFromCommandLine(cmd_line); |
| 1691 | 1691 |
| 1692 // Make sure the process exits cleanly on unexpected errors. | 1692 // Make sure the process exits cleanly on unexpected errors. |
| 1693 base::EnableTerminationOnHeapCorruption(); | 1693 base::EnableTerminationOnHeapCorruption(); |
| 1694 base::EnableTerminationOnOutOfMemory(); | 1694 base::EnableTerminationOnOutOfMemory(); |
| 1695 base::win::RegisterInvalidParamHandler(); | 1695 base::win::RegisterInvalidParamHandler(); |
| 1696 base::win::SetupCRT(cmd_line); | 1696 base::win::SetupCRT(cmd_line); |
| 1697 | 1697 |
| 1698 const bool is_uninstall = cmd_line.HasSwitch(installer::switches::kUninstall); | 1698 const bool is_uninstall = cmd_line.HasSwitch(installer::switches::kUninstall); |
| 1699 | 1699 |
| 1700 // Check to make sure current system is WinXP or later. If not, log | 1700 // Check to make sure current system is Win7 or later. If not, log |
| 1701 // error message and get out. | 1701 // error message and get out. |
| 1702 if (!InstallUtil::IsOSSupported()) { | 1702 if (!InstallUtil::IsOSSupported()) { |
| 1703 LOG(ERROR) << "Chrome only supports Windows XP or later."; | 1703 LOG(ERROR) << "Chrome only supports Windows 7 or later."; |
| 1704 installer_state.WriteInstallerResult( | 1704 installer_state.WriteInstallerResult( |
| 1705 installer::OS_NOT_SUPPORTED, IDS_INSTALL_OS_NOT_SUPPORTED_BASE, NULL); | 1705 installer::OS_NOT_SUPPORTED, IDS_INSTALL_OS_NOT_SUPPORTED_BASE, NULL); |
| 1706 return installer::OS_NOT_SUPPORTED; | 1706 return installer::OS_NOT_SUPPORTED; |
| 1707 } | 1707 } |
| 1708 | 1708 |
| 1709 // Initialize COM for use later. | 1709 // Initialize COM for use later. |
| 1710 base::win::ScopedCOMInitializer com_initializer; | 1710 base::win::ScopedCOMInitializer com_initializer; |
| 1711 if (!com_initializer.succeeded()) { | 1711 if (!com_initializer.succeeded()) { |
| 1712 installer_state.WriteInstallerResult( | 1712 installer_state.WriteInstallerResult( |
| 1713 installer::OS_ERROR, IDS_INSTALL_OS_ERROR_BASE, NULL); | 1713 installer::OS_ERROR, IDS_INSTALL_OS_ERROR_BASE, NULL); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1808 // to pass through, since this is only returned on uninstall which is | 1808 // to pass through, since this is only returned on uninstall which is |
| 1809 // never invoked directly by Google Update. | 1809 // never invoked directly by Google Update. |
| 1810 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1810 return_code = InstallUtil::GetInstallReturnCode(install_status); |
| 1811 } | 1811 } |
| 1812 | 1812 |
| 1813 installer::EndPersistentHistogramStorage(installer_state.target_path()); | 1813 installer::EndPersistentHistogramStorage(installer_state.target_path()); |
| 1814 VLOG(1) << "Installation complete, returning: " << return_code; | 1814 VLOG(1) << "Installation complete, returning: " << return_code; |
| 1815 | 1815 |
| 1816 return return_code; | 1816 return return_code; |
| 1817 } | 1817 } |
| OLD | NEW |