| 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 #include <windows.h> | 5 #include <windows.h> |
| 6 #include <tchar.h> | 6 #include <tchar.h> |
| 7 | 7 |
| 8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/debug_on_start.h" | 11 #include "base/debug_on_start.h" |
| 12 #include "base/process_util.h" |
| 12 #include "chrome/app/breakpad.h" | 13 #include "chrome/app/breakpad.h" |
| 13 #include "chrome/app/client_util.h" | 14 #include "chrome/app/client_util.h" |
| 14 #include "chrome/app/google_update_client.h" | 15 #include "chrome/app/google_update_client.h" |
| 15 #include "chrome/app/result_codes.h" | 16 #include "chrome/app/result_codes.h" |
| 16 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
| 17 #include "sandbox/src/sandbox_factory.h" | 18 #include "sandbox/src/sandbox_factory.h" |
| 18 #include "sandbox/src/dep.h" | 19 #include "sandbox/src/dep.h" |
| 19 | 20 |
| 20 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev_instance, | 21 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev_instance, |
| 21 wchar_t* command_line, int show_command) { | 22 wchar_t* command_line, int show_command) { |
| 23 process_util::EnableTerminationOnHeapCorruption(); |
| 24 |
| 22 // The exit manager is in charge of calling the dtors of singletons. | 25 // The exit manager is in charge of calling the dtors of singletons. |
| 23 base::AtExitManager exit_manager; | 26 base::AtExitManager exit_manager; |
| 24 | 27 |
| 25 // Note that std::wstring and CommandLine got linked anyway because of | 28 // Note that std::wstring and CommandLine got linked anyway because of |
| 26 // breakpad. | 29 // breakpad. |
| 27 CommandLine parsed_command_line; | 30 CommandLine parsed_command_line; |
| 28 std::wstring process_type = | 31 std::wstring process_type = |
| 29 parsed_command_line.GetSwitchValue(switches::kProcessType); | 32 parsed_command_line.GetSwitchValue(switches::kProcessType); |
| 30 | 33 |
| 31 const wchar_t* dll_name = L"chrome.dll"; | 34 const wchar_t* dll_name = L"chrome.dll"; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 client_util::DLL_MAIN entry = reinterpret_cast<client_util::DLL_MAIN>( | 100 client_util::DLL_MAIN entry = reinterpret_cast<client_util::DLL_MAIN>( |
| 98 ::GetProcAddress(dll_handle, "ChromeMain")); | 101 ::GetProcAddress(dll_handle, "ChromeMain")); |
| 99 if (NULL != entry) | 102 if (NULL != entry) |
| 100 return (entry)(instance, &sandbox_info, command_line, show_command); | 103 return (entry)(instance, &sandbox_info, command_line, show_command); |
| 101 } | 104 } |
| 102 #endif | 105 #endif |
| 103 | 106 |
| 104 return ResultCodes::GOOGLE_UPDATE_LAUNCH_FAILED; | 107 return ResultCodes::GOOGLE_UPDATE_LAUNCH_FAILED; |
| 105 } | 108 } |
| 106 | 109 |
| OLD | NEW |