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

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

Issue 10895: Add Terminate() to the Process object, have RenderProcessHost use this to avo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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/plugin_messages_internal.h ('k') | chrome/common/process_watcher.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 #ifndef CHROME_COMMON_PROCESS_WATCHER_H__ 5 #ifndef CHROME_COMMON_PROCESS_WATCHER_H_
6 #define CHROME_COMMON_PROCESS_WATCHER_H__ 6 #define CHROME_COMMON_PROCESS_WATCHER_H_
7 7
8 #include "base/basictypes.h"
8 #include "base/process_util.h" 9 #include "base/process_util.h"
9 10
10 class ProcessWatcher { 11 class ProcessWatcher {
11 public: 12 public:
12 // This method ensures that the specified process eventually terminates, and 13 // This method ensures that the specified process eventually terminates, and
13 // then it closes the given process handle. 14 // then it closes the given process handle.
14 // 15 //
15 // It assumes that the process has already been signalled to exit, and it 16 // It assumes that the process has already been signalled to exit, and it
16 // begins by waiting a small amount of time for it to exit. If the process 17 // begins by waiting a small amount of time for it to exit. If the process
17 // does not appear to have exited, then this function starts to become 18 // does not appear to have exited, then this function starts to become
18 // aggressive about ensuring that the process terminates. 19 // aggressive about ensuring that the process terminates.
19 // 20 //
20 // This method does not block the calling thread. 21 // This method does not block the calling thread.
21 // 22 //
22 // NOTE: The process handle must have been opened with the PROCESS_TERMINATE 23 // NOTE: The process handle must have been opened with the PROCESS_TERMINATE
23 // and SYNCHRONIZE permissions. 24 // and SYNCHRONIZE permissions.
24 // 25 //
25 static void EnsureProcessTerminated(ProcessHandle process_handle); 26 static void EnsureProcessTerminated(base::ProcessHandle process_handle);
26 27
27 private: 28 private:
28 // Do not instantiate this class. 29 // Do not instantiate this class.
29 ProcessWatcher(); 30 ProcessWatcher();
30 31
31 DISALLOW_EVIL_CONSTRUCTORS(ProcessWatcher); 32 DISALLOW_COPY_AND_ASSIGN(ProcessWatcher);
32 }; 33 };
33 34
34 #endif // CHROME_COMMON_PROCESS_WATCHER_H__ 35 #endif // CHROME_COMMON_PROCESS_WATCHER_H_
35 36
OLDNEW
« no previous file with comments | « chrome/common/plugin_messages_internal.h ('k') | chrome/common/process_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698