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

Side by Side Diff: base/process_util.h

Issue 10821062: Fix CleanupProcesses() interface to use TimeDelta. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 BASE_EXPORT bool WaitForSingleProcess(ProcessHandle handle, 525 BASE_EXPORT bool WaitForSingleProcess(ProcessHandle handle,
526 base::TimeDelta wait); 526 base::TimeDelta wait);
527 527
528 // Waits a certain amount of time (can be 0) for all the processes with a given 528 // Waits a certain amount of time (can be 0) for all the processes with a given
529 // executable name to exit, then kills off any of them that are still around. 529 // executable name to exit, then kills off any of them that are still around.
530 // If filter is non-null, then only processes selected by the filter are waited 530 // If filter is non-null, then only processes selected by the filter are waited
531 // on. Killed processes are ended with the given exit code. Returns false if 531 // on. Killed processes are ended with the given exit code. Returns false if
532 // any processes needed to be killed, true if they all exited cleanly within 532 // any processes needed to be killed, true if they all exited cleanly within
533 // the wait_milliseconds delay. 533 // the wait_milliseconds delay.
534 BASE_EXPORT bool CleanupProcesses(const FilePath::StringType& executable_name, 534 BASE_EXPORT bool CleanupProcesses(const FilePath::StringType& executable_name,
535 int64 wait_milliseconds, 535 base::TimeDelta wait,
536 int exit_code, 536 int exit_code,
537 const ProcessFilter* filter); 537 const ProcessFilter* filter);
538 538
539 // This method ensures that the specified process eventually terminates, and 539 // This method ensures that the specified process eventually terminates, and
540 // then it closes the given process handle. 540 // then it closes the given process handle.
541 // 541 //
542 // It assumes that the process has already been signalled to exit, and it 542 // It assumes that the process has already been signalled to exit, and it
543 // begins by waiting a small amount of time for it to exit. If the process 543 // begins by waiting a small amount of time for it to exit. If the process
544 // does not appear to have exited, then this function starts to become 544 // does not appear to have exited, then this function starts to become
545 // aggressive about ensuring that the process terminates. 545 // aggressive about ensuring that the process terminates.
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 // instance running inside the parent. The parent's Breakpad instance should 846 // instance running inside the parent. The parent's Breakpad instance should
847 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler 847 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler
848 // in the child after forking will restore the standard exception handler. 848 // in the child after forking will restore the standard exception handler.
849 // See http://crbug.com/20371/ for more details. 849 // See http://crbug.com/20371/ for more details.
850 void RestoreDefaultExceptionHandler(); 850 void RestoreDefaultExceptionHandler();
851 #endif // defined(OS_MACOSX) 851 #endif // defined(OS_MACOSX)
852 852
853 } // namespace base 853 } // namespace base
854 854
855 #endif // BASE_PROCESS_UTIL_H_ 855 #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