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