Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 // This file contains functions for launching subprocesses. | 5 // This file contains functions for launching subprocesses. |
| 6 | 6 |
| 7 #ifndef BASE_PROCESS_LAUNCH_H_ | 7 #ifndef BASE_PROCESS_LAUNCH_H_ |
| 8 #define BASE_PROCESS_LAUNCH_H_ | 8 #define BASE_PROCESS_LAUNCH_H_ |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 208 // Restore the default exception handler, setting it to Apple Crash Reporter | 208 // Restore the default exception handler, setting it to Apple Crash Reporter |
| 209 // (ReportCrash). When forking and execing a new process, the child will | 209 // (ReportCrash). When forking and execing a new process, the child will |
| 210 // inherit the parent's exception ports, which may be set to the Breakpad | 210 // inherit the parent's exception ports, which may be set to the Breakpad |
| 211 // instance running inside the parent. The parent's Breakpad instance should | 211 // instance running inside the parent. The parent's Breakpad instance should |
| 212 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler | 212 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler |
| 213 // in the child after forking will restore the standard exception handler. | 213 // in the child after forking will restore the standard exception handler. |
| 214 // See http://crbug.com/20371/ for more details. | 214 // See http://crbug.com/20371/ for more details. |
| 215 void RestoreDefaultExceptionHandler(); | 215 void RestoreDefaultExceptionHandler(); |
| 216 #endif // defined(OS_MACOSX) | 216 #endif // defined(OS_MACOSX) |
| 217 | 217 |
| 218 #if defined(OS_WIN) | |
| 219 // Launches a process with elevated privileges. This does not behave exactly | |
| 220 // like LaunchProcess as it uses ShellExecuteEx instead of CreateProcess to | |
| 221 // create the process. This means the process will have elevated privileges | |
| 222 // and thus some common operations liie OpenProcess will fail. The process will | |
|
mef
2013/12/18 21:02:10
nit: like
Drew Haven
2014/01/09 01:15:14
Done.
| |
| 223 // be available through the |process_handle| argument. Currently the only | |
| 224 // option that is supported from LaunchOptions is start_hidden. | |
| 225 BASE_EXPORT bool LaunchElevatedProcess(const CommandLine& cmdline, | |
| 226 const LaunchOptions& options, | |
| 227 ProcessHandle* process_handle); | |
| 228 #endif | |
| 229 | |
| 218 } // namespace base | 230 } // namespace base |
| 219 | 231 |
| 220 #endif // BASE_PROCESS_LAUNCH_H_ | 232 #endif // BASE_PROCESS_LAUNCH_H_ |
| OLD | NEW |