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

Side by Side Diff: base/process_util.h

Issue 18446: Porting in chrome/ (Closed)
Patch Set: last fixes Created 11 years, 11 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_posix.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 PROCESS_END_KILLED_BY_USER = 1, 54 PROCESS_END_KILLED_BY_USER = 1,
55 PROCESS_END_PROCESS_WAS_HUNG = 2 55 PROCESS_END_PROCESS_WAS_HUNG = 2
56 }; 56 };
57 57
58 // Returns the id of the current process. 58 // Returns the id of the current process.
59 int GetCurrentProcId(); 59 int GetCurrentProcId();
60 60
61 // Returns the ProcessHandle of the current process. 61 // Returns the ProcessHandle of the current process.
62 ProcessHandle GetCurrentProcessHandle(); 62 ProcessHandle GetCurrentProcessHandle();
63 63
64 // Closes given process handle. Returns true on success.
65 bool CloseProcessHandle(ProcessHandle process);
66
64 // Returns the unique ID for the specified process. This is functionally the 67 // Returns the unique ID for the specified process. This is functionally the
65 // same as Windows' GetProcessId(), but works on versions of Windows before 68 // same as Windows' GetProcessId(), but works on versions of Windows before
66 // Win XP SP1 as well. 69 // Win XP SP1 as well.
67 int GetProcId(ProcessHandle process); 70 int GetProcId(ProcessHandle process);
68 71
69 #if defined(OS_POSIX) 72 #if defined(OS_POSIX)
70 // Returns the maximum number of files that a process can have open. 73 // Returns the maximum number of files that a process can have open.
71 // Returns 0 on error. 74 // Returns 0 on error.
72 int GetMaxFilesOpenInProcess(); 75 int GetMaxFilesOpenInProcess();
73 #endif 76 #endif
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // overflow. Has no effect if the OS doesn't provide the necessary facility. 339 // overflow. Has no effect if the OS doesn't provide the necessary facility.
337 void EnableTerminationOnHeapCorruption(); 340 void EnableTerminationOnHeapCorruption();
338 341
339 // If supported on the platform, and the user has sufficent rights, increase 342 // If supported on the platform, and the user has sufficent rights, increase
340 // the current process's scheduling priority to a high priority. 343 // the current process's scheduling priority to a high priority.
341 void RaiseProcessToHighPriority(); 344 void RaiseProcessToHighPriority();
342 345
343 } // namespace base 346 } // namespace base
344 347
345 #endif // BASE_PROCESS_UTIL_H_ 348 #endif // BASE_PROCESS_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/process_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698