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

Unified Diff: content/browser/browser_child_process_host_impl.h

Issue 651253002: Enforce handle ownership in base::Process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_child_process_host_impl.h
diff --git a/content/browser/browser_child_process_host_impl.h b/content/browser/browser_child_process_host_impl.h
index bce1832afa6336b2116c9ac46850c1be83819f9f..53b5aa43eca3b54bf23496fe2c87305fec9651c1 100644
--- a/content/browser/browser_child_process_host_impl.h
+++ b/content/browser/browser_child_process_host_impl.h
@@ -17,6 +17,10 @@
#include "content/public/browser/child_process_data.h"
#include "content/public/common/child_process_host_delegate.h"
+#if defined(OS_WIN)
+#include "base/win/object_watcher.h"
+#endif
+
namespace base {
class CommandLine;
}
@@ -33,6 +37,9 @@ class BrowserMessageFilter;
class CONTENT_EXPORT BrowserChildProcessHostImpl
: public BrowserChildProcessHost,
public NON_EXPORTED_BASE(ChildProcessHostDelegate),
+#if defined(OS_WIN)
+ public base::win::ObjectWatcher::Delegate,
+#endif
public ChildProcessLauncher::Client {
public:
BrowserChildProcessHostImpl(
@@ -100,8 +107,8 @@ class CONTENT_EXPORT BrowserChildProcessHostImpl
virtual void OnProcessLaunchFailed() override;
#if defined(OS_WIN)
- void DeleteProcessWaitableEvent(base::WaitableEvent* event);
- void OnProcessExitedEarly(base::WaitableEvent* event);
+ // ObjectWatcher implementation.
no sievers 2014/10/17 18:43:16 nit: ObjectWatcher::Delegate implementation.
rvargas (doing something else) 2014/10/17 19:12:54 Done.
+ void OnObjectSignaled(HANDLE object) override;
#endif
ChildProcessData data_;
@@ -116,7 +123,7 @@ class CONTENT_EXPORT BrowserChildProcessHostImpl
// Watches to see if the child process exits before the IPC channel has
// been connected. Thereafter, its exit is determined by an error on the
// IPC channel.
- base::WaitableEventWatcher early_exit_watcher_;
+ base::win::ObjectWatcher early_exit_watcher_;
#endif
};
« no previous file with comments | « components/policy/core/common/policy_loader_win_unittest.cc ('k') | content/browser/browser_child_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698