| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef COMPONENTS_CRASH_CONTENT_APP_RUN_AS_CRASHPAD_HANDLER_WIN_H_ | 5 #ifndef COMPONENTS_CRASH_CONTENT_APP_RUN_AS_CRASHPAD_HANDLER_WIN_H_ |
| 6 #define COMPONENTS_CRASH_CONTENT_APP_RUN_AS_CRASHPAD_HANDLER_WIN_H_ | 6 #define COMPONENTS_CRASH_CONTENT_APP_RUN_AS_CRASHPAD_HANDLER_WIN_H_ |
| 7 | 7 |
| 8 namespace base { | 8 namespace base { |
| 9 class CommandLine; | 9 class CommandLine; |
| 10 } | 10 } |
| 11 | 11 |
| 12 namespace crash_reporter { | 12 namespace crash_reporter { |
| 13 | 13 |
| 14 // Helper for running an embedded copy of crashpad_handler. Searches for and | 14 // Helper for running an embedded copy of crashpad_handler. Searches for and |
| 15 // removes --switches::kProcessType=xyz arguments in the command line, and all | 15 // removes --(process_type_switch)=xyz arguments in the command line, and all |
| 16 // options starting with '/' (for "/prefetch:N"), and then runs | 16 // options starting with '/' (for "/prefetch:N"), and then runs |
| 17 // crashpad::HandlerMain with the remaining arguments. | 17 // crashpad::HandlerMain with the remaining arguments. |
| 18 int RunAsCrashpadHandler(const base::CommandLine& command_line); | 18 // |
| 19 // Normally, pass switches::kProcessType for process_type_switch. It's accepted |
| 20 // as a parameter because this component does not have access to content/, where |
| 21 // that variable lives. |
| 22 int RunAsCrashpadHandler(const base::CommandLine& command_line, |
| 23 const char* process_type_switch); |
| 19 | 24 |
| 20 } // namespace crash_reporter | 25 } // namespace crash_reporter |
| 21 | 26 |
| 22 #endif // COMPONENTS_CRASH_CONTENT_APP_RUN_AS_CRASHPAD_HANDLER_WIN_H_ | 27 #endif // COMPONENTS_CRASH_CONTENT_APP_RUN_AS_CRASHPAD_HANDLER_WIN_H_ |
| OLD | NEW |