Chromium Code Reviews| Index: chrome_frame/chrome_launcher_main.cc |
| =================================================================== |
| --- chrome_frame/chrome_launcher_main.cc (revision 72310) |
| +++ chrome_frame/chrome_launcher_main.cc (working copy) |
| @@ -2,25 +2,29 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| - |
| #include <windows.h> |
| #include <DbgHelp.h> |
| #include <string> |
| #include "chrome_frame/chrome_launcher.h" |
| #include "chrome_frame/crash_server_init.h" |
| +#include "chrome_frame/update_launcher.h" |
| - |
| int APIENTRY wWinMain(HINSTANCE, HINSTANCE, wchar_t*, int) { |
| const wchar_t* cmd_line = ::GetCommandLine(); |
| google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad( |
| InitializeCrashReporting(cmd_line)); |
| + std::wstring update_command = |
| + update_launcher::GetUpdateCommandFromArguments(cmd_line); |
|
robertshield
2011/01/24 15:08:42
Nit: prefer constructor syntax:
std::wstring upda
erikwright (departed)
2011/01/24 17:17:14
Done.
|
| + |
| UINT exit_code = ERROR_FILE_NOT_FOUND; |
| - if (chrome_launcher::SanitizeAndLaunchChrome(::GetCommandLine())) { |
| + |
| + if (!update_command.empty()) |
| + exit_code = update_launcher::LaunchUpdateCommand(update_command); |
| + else if (chrome_launcher::SanitizeAndLaunchChrome(cmd_line)) |
| exit_code = ERROR_SUCCESS; |
| - } |
| return exit_code; |
| } |