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

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

Issue 938453002: Remove base::WaitForSingleProcess (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cl format :( Created 5 years, 10 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 | « base/process/kill_win.cc ('k') | base/process/process_unittest.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 BASE_PROCESS_PROCESS_PROCESS_H_ 5 #ifndef BASE_PROCESS_PROCESS_PROCESS_H_
6 #define BASE_PROCESS_PROCESS_PROCESS_H_ 6 #define BASE_PROCESS_PROCESS_PROCESS_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/move.h" 10 #include "base/move.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Close the process handle. This will not terminate the process. 91 // Close the process handle. This will not terminate the process.
92 void Close(); 92 void Close();
93 93
94 // Terminates the process with extreme prejudice. The given |result_code| will 94 // Terminates the process with extreme prejudice. The given |result_code| will
95 // be the exit code of the process. 95 // be the exit code of the process.
96 // NOTE: On POSIX |result_code| is ignored. 96 // NOTE: On POSIX |result_code| is ignored.
97 void Terminate(int result_code); 97 void Terminate(int result_code);
98 98
99 // Waits for the process to exit. Returns true on success. 99 // Waits for the process to exit. Returns true on success.
100 // On POSIX, if the process has been signaled then |exit_code| is set to -1. 100 // On POSIX, if the process has been signaled then |exit_code| is set to -1.
101 // On Linux this must be a child process, however on Mac and Windows it can be
102 // any process.
101 bool WaitForExit(int* exit_code); 103 bool WaitForExit(int* exit_code);
102 104
103 // Same as WaitForExit() but only waits for up to |timeout|. 105 // Same as WaitForExit() but only waits for up to |timeout|.
104 bool WaitForExitWithTimeout(TimeDelta timeout, int* exit_code); 106 bool WaitForExitWithTimeout(TimeDelta timeout, int* exit_code);
105 107
106 // A process is backgrounded when it's priority is lower than normal. 108 // A process is backgrounded when it's priority is lower than normal.
107 // Return true if this process is backgrounded, false otherwise. 109 // Return true if this process is backgrounded, false otherwise.
108 bool IsProcessBackgrounded() const; 110 bool IsProcessBackgrounded() const;
109 111
110 // Set a process as backgrounded. If value is true, the priority of the 112 // Set a process as backgrounded. If value is true, the priority of the
(...skipping 11 matching lines...) Expand all
122 bool is_current_process_; 124 bool is_current_process_;
123 win::ScopedHandle process_; 125 win::ScopedHandle process_;
124 #else 126 #else
125 ProcessHandle process_; 127 ProcessHandle process_;
126 #endif 128 #endif
127 }; 129 };
128 130
129 } // namespace base 131 } // namespace base
130 132
131 #endif // BASE_PROCESS_PROCESS_PROCESS_H_ 133 #endif // BASE_PROCESS_PROCESS_PROCESS_H_
OLDNEW
« no previous file with comments | « base/process/kill_win.cc ('k') | base/process/process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698