| Index: content/common/child_thread.cc
|
| ===================================================================
|
| --- content/common/child_thread.cc (revision 101774)
|
| +++ content/common/child_thread.cc (working copy)
|
| @@ -22,6 +22,10 @@
|
| #include "ipc/ipc_switches.h"
|
| #include "webkit/glue/webkit_glue.h"
|
|
|
| +#if defined(OS_WIN)
|
| +#include "content/common/handle_enumerator_win.h"
|
| +#endif
|
| +
|
| ChildThread::ChildThread() {
|
| channel_name_ = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| switches::kProcessChannelID);
|
| @@ -158,6 +162,7 @@
|
| IPC_MESSAGE_HANDLER(ChildProcessMsg_SetIPCLoggingEnabled,
|
| OnSetIPCLoggingEnabled)
|
| #endif
|
| + IPC_MESSAGE_HANDLER(ChildProcessMsg_DumpHandles, OnDumpHandles)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
|
|
| @@ -191,6 +196,20 @@
|
| }
|
| #endif // IPC_MESSAGE_LOG_ENABLED
|
|
|
| +void ChildThread::OnDumpHandles() {
|
| +#if defined(OS_WIN)
|
| + scoped_refptr<content::HandleEnumerator> handle_enum(
|
| + new content::HandleEnumerator(
|
| + CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kAuditAllHandles)));
|
| + handle_enum->EnumerateHandles();
|
| + Send(new ChildProcessHostMsg_DumpHandlesDone);
|
| + return;
|
| +#endif
|
| +
|
| + NOTIMPLEMENTED();
|
| +}
|
| +
|
| ChildThread* ChildThread::current() {
|
| return ChildProcess::current()->main_thread();
|
| }
|
|
|