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 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1666 // deletion at reboot when this scope closes. | 1666 // deletion at reboot when this scope closes. |
1667 VLOG(1) << "Deleting temporary directory " << temp_path.path().value(); | 1667 VLOG(1) << "Deleting temporary directory " << temp_path.path().value(); |
1668 | 1668 |
1669 return install_status; | 1669 return install_status; |
1670 } | 1670 } |
1671 | 1671 |
1672 } // namespace installer | 1672 } // namespace installer |
1673 | 1673 |
1674 int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, | 1674 int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, |
1675 wchar_t* command_line, int show_command) { | 1675 wchar_t* command_line, int show_command) { |
| 1676 // Check to see if the CPU is supported before doing anything else. There's |
| 1677 // very little than can safely be accomplished if the CPU isn't supported |
| 1678 // since dependent libraries (e.g., base) may use invalid instructions. |
| 1679 if (!installer::IsProcessorSupported()) |
| 1680 return installer::CPU_NOT_SUPPORTED; |
| 1681 |
1676 // The exit manager is in charge of calling the dtors of singletons. | 1682 // The exit manager is in charge of calling the dtors of singletons. |
1677 base::AtExitManager exit_manager; | 1683 base::AtExitManager exit_manager; |
1678 CommandLine::Init(0, NULL); | 1684 CommandLine::Init(0, NULL); |
1679 | 1685 |
1680 const MasterPreferences& prefs = MasterPreferences::ForCurrentProcess(); | 1686 const MasterPreferences& prefs = MasterPreferences::ForCurrentProcess(); |
1681 installer::InitInstallerLogging(prefs); | 1687 installer::InitInstallerLogging(prefs); |
1682 | 1688 |
1683 const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); | 1689 const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); |
1684 VLOG(1) << "Command Line: " << cmd_line.GetCommandLineString(); | 1690 VLOG(1) << "Command Line: " << cmd_line.GetCommandLineString(); |
1685 | 1691 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1811 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1817 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1812 // to pass through, since this is only returned on uninstall which is | 1818 // to pass through, since this is only returned on uninstall which is |
1813 // never invoked directly by Google Update. | 1819 // never invoked directly by Google Update. |
1814 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1820 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1815 } | 1821 } |
1816 | 1822 |
1817 VLOG(1) << "Installation complete, returning: " << return_code; | 1823 VLOG(1) << "Installation complete, returning: " << return_code; |
1818 | 1824 |
1819 return return_code; | 1825 return return_code; |
1820 } | 1826 } |
OLD | NEW |