blob: d56ca92cd8309bc5a26b09e60ec305eb4819f5e3 [file] [log] [blame]
[email protected]2249aeb32009-10-28 10:37:571// 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]79b663c2010-05-28 17:27:175
[email protected]2249aeb32009-10-28 10:37:576#include <windows.h>
[email protected]79b663c2010-05-28 17:27:177#include <DbgHelp.h>
8#include <string>
[email protected]2249aeb32009-10-28 10:37:579
10#include "chrome_frame/chrome_launcher.h"
[email protected]e4fe427b2010-09-03 19:57:4211#include "chrome_frame/crash_server_init.h"
[email protected]2249aeb32009-10-28 10:37:5712
[email protected]79b663c2010-05-28 17:27:1713
[email protected]2249aeb32009-10-28 10:37:5714int APIENTRY wWinMain(HINSTANCE, HINSTANCE, wchar_t*, int) {
[email protected]79b663c2010-05-28 17:27:1715 const wchar_t* cmd_line = ::GetCommandLine();
[email protected]2249aeb32009-10-28 10:37:5716
[email protected]79b663c2010-05-28 17:27:1717 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad(
18 InitializeCrashReporting(cmd_line));
[email protected]2249aeb32009-10-28 10:37:5719
20 UINT exit_code = ERROR_FILE_NOT_FOUND;
[email protected]79b663c2010-05-28 17:27:1721 if (chrome_launcher::SanitizeAndLaunchChrome(::GetCommandLine())) {
22 exit_code = ERROR_SUCCESS;
[email protected]2249aeb32009-10-28 10:37:5723 }
[email protected]79b663c2010-05-28 17:27:1724
25 return exit_code;
[email protected]2249aeb32009-10-28 10:37:5726}