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

Unified Diff: content/common/child_thread.h

Issue 10855013: Ensure we don't have zombie child processes that get started but never get a chance to connect to t… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | content/common/child_thread.cc » ('j') | content/common/child_thread.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/child_thread.h
===================================================================
--- content/common/child_thread.h (revision 150143)
+++ content/common/child_thread.h (working copy)
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/shared_memory.h"
#include "base/tracked_objects.h"
#include "content/common/content_export.h"
@@ -100,17 +101,7 @@
void OnProcessFinalRelease();
virtual bool OnControlMessageReceived(const IPC::Message& msg);
- virtual void OnShutdown();
-#ifdef IPC_MESSAGE_LOG_ENABLED
- virtual void OnSetIPCLoggingEnabled(bool enable);
-#endif
-
- virtual void OnSetProfilerStatus(tracked_objects::ThreadData::Status status);
- virtual void OnGetChildProfilerData(int sequence_number);
-
- virtual void OnDumpHandles();
-
void set_on_channel_error_called(bool on_channel_error_called) {
on_channel_error_called_ = on_channel_error_called;
}
@@ -123,10 +114,20 @@
private:
void Init();
+ // IPC message handlers.
+ void OnShutdown();
+ void OnSetProfilerStatus(tracked_objects::ThreadData::Status status);
+ void OnGetChildProfilerData(int sequence_number);
+ void OnDumpHandles();
+#ifdef IPC_MESSAGE_LOG_ENABLED
+ void OnSetIPCLoggingEnabled(bool enable);
+#endif
#if defined(USE_TCMALLOC)
void OnGetTcmallocStats();
#endif
+ void EnsureConnected();
+
std::string channel_name_;
scoped_ptr<IPC::SyncChannel> channel_;
@@ -154,6 +155,8 @@
scoped_refptr<content::ChildHistogramMessageFilter> histogram_message_filter_;
+ base::WeakPtrFactory<ChildThread> channel_connected_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ChildThread);
};
« no previous file with comments | « no previous file | content/common/child_thread.cc » ('j') | content/common/child_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698