[email protected] | 2249aeb3 | 2009-10-28 10:37:57 | [diff] [blame] | 1 | // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | 79b663c | 2010-05-28 17:27:17 | [diff] [blame] | 5 | |
[email protected] | 2249aeb3 | 2009-10-28 10:37:57 | [diff] [blame] | 6 | #include <windows.h> |
[email protected] | 79b663c | 2010-05-28 17:27:17 | [diff] [blame] | 7 | #include <DbgHelp.h> |
8 | #include <string> | ||||
[email protected] | 2249aeb3 | 2009-10-28 10:37:57 | [diff] [blame] | 9 | |
10 | #include "chrome_frame/chrome_launcher.h" | ||||
[email protected] | e4fe427b | 2010-09-03 19:57:42 | [diff] [blame] | 11 | #include "chrome_frame/crash_server_init.h" |
[email protected] | 2249aeb3 | 2009-10-28 10:37:57 | [diff] [blame] | 12 | |
[email protected] | 79b663c | 2010-05-28 17:27:17 | [diff] [blame] | 13 | |
[email protected] | 2249aeb3 | 2009-10-28 10:37:57 | [diff] [blame] | 14 | int APIENTRY wWinMain(HINSTANCE, HINSTANCE, wchar_t*, int) { |
[email protected] | 79b663c | 2010-05-28 17:27:17 | [diff] [blame] | 15 | const wchar_t* cmd_line = ::GetCommandLine(); |
[email protected] | 2249aeb3 | 2009-10-28 10:37:57 | [diff] [blame] | 16 | |
[email protected] | 79b663c | 2010-05-28 17:27:17 | [diff] [blame] | 17 | google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad( |
18 | InitializeCrashReporting(cmd_line)); | ||||
[email protected] | 2249aeb3 | 2009-10-28 10:37:57 | [diff] [blame] | 19 | |
20 | UINT exit_code = ERROR_FILE_NOT_FOUND; | ||||
[email protected] | 79b663c | 2010-05-28 17:27:17 | [diff] [blame] | 21 | if (chrome_launcher::SanitizeAndLaunchChrome(::GetCommandLine())) { |
22 | exit_code = ERROR_SUCCESS; | ||||
[email protected] | 2249aeb3 | 2009-10-28 10:37:57 | [diff] [blame] | 23 | } |
[email protected] | 79b663c | 2010-05-28 17:27:17 | [diff] [blame] | 24 | |
25 | return exit_code; | ||||
[email protected] | 2249aeb3 | 2009-10-28 10:37:57 | [diff] [blame] | 26 | } |