Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: base/process/launch.h

Issue 90963002: Revert of Base: Remove Receive() from ScopedHandle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/memory/shared_memory_unittest.cc ('k') | base/process/launch_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
11 #include <string> 11 #include <string>
12 #include <utility> 12 #include <utility>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/base_export.h" 15 #include "base/base_export.h"
16 #include "base/basictypes.h" 16 #include "base/basictypes.h"
17 #include "base/environment.h" 17 #include "base/environment.h"
18 #include "base/process/process_handle.h" 18 #include "base/process/process_handle.h"
19 19
20 #if defined(OS_POSIX) 20 #if defined(OS_POSIX)
21 #include "base/posix/file_descriptor_shuffle.h" 21 #include "base/posix/file_descriptor_shuffle.h"
22 #elif defined(OS_WIN) 22 #elif defined(OS_WIN)
23 #include <windows.h> 23 #include <windows.h>
24 #include "base/win/scoped_handle.h"
25 #endif 24 #endif
26 25
27 class CommandLine; 26 class CommandLine;
28 27
29 namespace base { 28 namespace base {
30 29
31 typedef std::vector<std::pair<int, int> > FileHandleMappingVector; 30 typedef std::vector<std::pair<int, int> > FileHandleMappingVector;
32 31
33 // Options for launching a subprocess that are passed to LaunchProcess(). 32 // Options for launching a subprocess that are passed to LaunchProcess().
34 // The default constructor constructs the object with default options. 33 // The default constructor constructs the object with default options.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // command line arguments directly, but prefer the CommandLine version 139 // command line arguments directly, but prefer the CommandLine version
141 // if launching Chrome itself. 140 // if launching Chrome itself.
142 // 141 //
143 // The first command line argument should be the path to the process, 142 // The first command line argument should be the path to the process,
144 // and don't forget to quote it. 143 // and don't forget to quote it.
145 // 144 //
146 // Example (including literal quotes) 145 // Example (including literal quotes)
147 // cmdline = "c:\windows\explorer.exe" -foo "c:\bar\" 146 // cmdline = "c:\windows\explorer.exe" -foo "c:\bar\"
148 BASE_EXPORT bool LaunchProcess(const string16& cmdline, 147 BASE_EXPORT bool LaunchProcess(const string16& cmdline,
149 const LaunchOptions& options, 148 const LaunchOptions& options,
150 win::ScopedHandle* process_handle); 149 ProcessHandle* process_handle);
151 150
152 #elif defined(OS_POSIX) 151 #elif defined(OS_POSIX)
153 // A POSIX-specific version of LaunchProcess that takes an argv array 152 // A POSIX-specific version of LaunchProcess that takes an argv array
154 // instead of a CommandLine. Useful for situations where you need to 153 // instead of a CommandLine. Useful for situations where you need to
155 // control the command line arguments directly, but prefer the 154 // control the command line arguments directly, but prefer the
156 // CommandLine version if launching Chrome itself. 155 // CommandLine version if launching Chrome itself.
157 BASE_EXPORT bool LaunchProcess(const std::vector<std::string>& argv, 156 BASE_EXPORT bool LaunchProcess(const std::vector<std::string>& argv,
158 const LaunchOptions& options, 157 const LaunchOptions& options,
159 ProcessHandle* process_handle); 158 ProcessHandle* process_handle);
160 159
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // instance running inside the parent. The parent's Breakpad instance should 211 // instance running inside the parent. The parent's Breakpad instance should
213 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler 212 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler
214 // in the child after forking will restore the standard exception handler. 213 // in the child after forking will restore the standard exception handler.
215 // See http://crbug.com/20371/ for more details. 214 // See http://crbug.com/20371/ for more details.
216 void RestoreDefaultExceptionHandler(); 215 void RestoreDefaultExceptionHandler();
217 #endif // defined(OS_MACOSX) 216 #endif // defined(OS_MACOSX)
218 217
219 } // namespace base 218 } // namespace base
220 219
221 #endif // BASE_PROCESS_LAUNCH_H_ 220 #endif // BASE_PROCESS_LAUNCH_H_
OLDNEW
« no previous file with comments | « base/memory/shared_memory_unittest.cc ('k') | base/process/launch_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698