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

Side by Side Diff: base/process_util.h

Issue 165067: Remove the Mac-specific implementation of LaunchApp, and share the Linux version. (Closed)
Patch Set: Removing stray files from patch Created 11 years, 4 months 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
« no previous file with comments | « no previous file | base/process_util_linux.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/namespace contains utility functions for enumerating, ending and 5 // This file/namespace contains utility functions for enumerating, ending and
6 // computing statistics of processes. 6 // computing statistics of processes.
7 7
8 #ifndef BASE_PROCESS_UTIL_H_ 8 #ifndef BASE_PROCESS_UTIL_H_
9 #define BASE_PROCESS_UTIL_H_ 9 #define BASE_PROCESS_UTIL_H_
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // 135 //
136 // As above, if wait is true, execute synchronously. The pid will be stored 136 // As above, if wait is true, execute synchronously. The pid will be stored
137 // in process_handle if that pointer is non-null. 137 // in process_handle if that pointer is non-null.
138 // 138 //
139 // Note that the first argument in argv must point to the executable filename. 139 // Note that the first argument in argv must point to the executable filename.
140 // If the filename is not fully specified, PATH will be searched. 140 // If the filename is not fully specified, PATH will be searched.
141 typedef std::vector<std::pair<int, int> > file_handle_mapping_vector; 141 typedef std::vector<std::pair<int, int> > file_handle_mapping_vector;
142 bool LaunchApp(const std::vector<std::string>& argv, 142 bool LaunchApp(const std::vector<std::string>& argv,
143 const file_handle_mapping_vector& fds_to_remap, 143 const file_handle_mapping_vector& fds_to_remap,
144 bool wait, ProcessHandle* process_handle); 144 bool wait, ProcessHandle* process_handle);
145 #if defined(OS_LINUX) 145
146 // Similar to above, but also (un)set environment variables in child process 146 // Similar to above, but also (un)set environment variables in child process
147 // through |environ|. 147 // through |environ|.
148 typedef std::vector<std::pair<const char*, const char*> > environment_vector; 148 typedef std::vector<std::pair<const char*, const char*> > environment_vector;
149 bool LaunchApp(const std::vector<std::string>& argv, 149 bool LaunchApp(const std::vector<std::string>& argv,
150 const environment_vector& environ, 150 const environment_vector& environ,
151 const file_handle_mapping_vector& fds_to_remap, 151 const file_handle_mapping_vector& fds_to_remap,
152 bool wait, ProcessHandle* process_handle); 152 bool wait, ProcessHandle* process_handle);
153 #endif // defined(OS_LINUX)
154 #endif // defined(OS_POSIX) 153 #endif // defined(OS_POSIX)
155 154
156 // Executes the application specified by cl. This function delegates to one 155 // Executes the application specified by cl. This function delegates to one
157 // of the above two platform-specific functions. 156 // of the above two platform-specific functions.
158 bool LaunchApp(const CommandLine& cl, 157 bool LaunchApp(const CommandLine& cl,
159 bool wait, bool start_hidden, ProcessHandle* process_handle); 158 bool wait, bool start_hidden, ProcessHandle* process_handle);
160 159
161 // Executes the application specified by |cl| and wait for it to exit. Stores 160 // Executes the application specified by |cl| and wait for it to exit. Stores
162 // the output (stdout) in |output|. Redirects stderr to /dev/null. Returns true 161 // the output (stdout) in |output|. Redirects stderr to /dev/null. Returns true
163 // on success (application launched and exited cleanly, with exit code 162 // on success (application launched and exited cleanly, with exit code
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 // overflow. Has no effect if the OS doesn't provide the necessary facility. 401 // overflow. Has no effect if the OS doesn't provide the necessary facility.
403 void EnableTerminationOnHeapCorruption(); 402 void EnableTerminationOnHeapCorruption();
404 403
405 // If supported on the platform, and the user has sufficent rights, increase 404 // If supported on the platform, and the user has sufficent rights, increase
406 // the current process's scheduling priority to a high priority. 405 // the current process's scheduling priority to a high priority.
407 void RaiseProcessToHighPriority(); 406 void RaiseProcessToHighPriority();
408 407
409 } // namespace base 408 } // namespace base
410 409
411 #endif // BASE_PROCESS_UTIL_H_ 410 #endif // BASE_PROCESS_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/process_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698