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

Side by Side Diff: chrome/common/process_watcher.h

Issue 6672070: Move the remaining files in chrome\common to content\common. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/page_zoom.h ('k') | chrome/common/process_watcher_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_PROCESS_WATCHER_H_
6 #define CHROME_COMMON_PROCESS_WATCHER_H_
7 #pragma once
8
9 #include "build/build_config.h"
10
11 #include "base/basictypes.h"
12 #include "base/process.h"
13
14 class ProcessWatcher {
15 public:
16 // This method ensures that the specified process eventually terminates, and
17 // then it closes the given process handle.
18 //
19 // It assumes that the process has already been signalled to exit, and it
20 // begins by waiting a small amount of time for it to exit. If the process
21 // does not appear to have exited, then this function starts to become
22 // aggressive about ensuring that the process terminates.
23 //
24 // On Linux this method does not block the calling thread.
25 // On OS X this method may block for up to 2 seconds.
26 //
27 // NOTE: The process handle must have been opened with the PROCESS_TERMINATE
28 // and SYNCHRONIZE permissions.
29 //
30 static void EnsureProcessTerminated(base::ProcessHandle process_handle);
31
32 #if defined(OS_POSIX) && !defined(OS_MACOSX)
33 // The nicer version of EnsureProcessTerminated() that is patient and will
34 // wait for |process_handle| to finish and then reap it.
35 static void EnsureProcessGetsReaped(base::ProcessHandle process_handle);
36 #endif
37
38 private:
39 // Do not instantiate this class.
40 ProcessWatcher();
41
42 DISALLOW_COPY_AND_ASSIGN(ProcessWatcher);
43 };
44
45 #endif // CHROME_COMMON_PROCESS_WATCHER_H_
OLDNEW
« no previous file with comments | « chrome/common/page_zoom.h ('k') | chrome/common/process_watcher_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698