Dispose of NPOject in npobject_identity_test.cc
[chromium-blink-merge.git] / chrome_frame / chrome_launcher_main.cc
blob462a31728d4ce76e7acd5d0e5a1ffeda4cb30ee6
1 // Copyright (c) 2011 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.
5 #include <windows.h>
6 #include <DbgHelp.h>
7 #include <string>
9 #include "chrome_frame/chrome_launcher.h"
10 #include "chrome_frame/crash_server_init.h"
11 #include "chrome_frame/update_launcher.h"
13 int APIENTRY wWinMain(HINSTANCE, HINSTANCE, wchar_t*, int) {
14 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad(
15 InitializeCrashReporting(NORMAL));
17 const wchar_t* cmd_line = ::GetCommandLine();
18 std::wstring update_command(
19 update_launcher::GetUpdateCommandFromArguments(cmd_line));
21 UINT exit_code = ERROR_FILE_NOT_FOUND;
23 if (!update_command.empty())
24 exit_code = update_launcher::LaunchUpdateCommand(update_command);
25 else if (chrome_launcher::SanitizeAndLaunchChrome(cmd_line))
26 exit_code = ERROR_SUCCESS;
28 return exit_code;