| Index: content/common/child_thread.cc
|
| ===================================================================
|
| --- content/common/child_thread.cc (revision 101774)
|
| +++ content/common/child_thread.cc (working copy)
|
| @@ -12,6 +12,7 @@
|
| #include "content/common/child_trace_message_filter.h"
|
| #include "content/common/content_switches.h"
|
| #include "content/common/file_system/file_system_dispatcher.h"
|
| +#include "content/common/handle_enumerator.h"
|
| #include "content/common/notification_service.h"
|
| #include "content/common/quota_dispatcher.h"
|
| #include "content/common/resource_dispatcher.h"
|
| @@ -158,6 +159,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 +193,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();
|
| }
|
|
|