Chromium Code Reviews| Index: content/browser/child_process_launcher.cc |
| =================================================================== |
| --- content/browser/child_process_launcher.cc (revision 88440) |
| +++ content/browser/child_process_launcher.cc (working copy) |
| @@ -19,7 +19,10 @@ |
| #include "content/common/result_codes.h" |
| #if defined(OS_WIN) |
| +#include "build/build_config.h" |
| #include "base/file_path.h" |
| +#include "chrome/common/chrome_switches.h" |
|
jam
2011/06/09 21:44:29
this isn't needed
Cris Neckar
2011/06/09 22:17:16
Done.
|
| +#include "content/browser/handle_enumerator_win.h" |
| #include "content/common/sandbox_policy.h" |
| #elif defined(OS_MACOSX) |
| #include "chrome/browser/mach_broker_mac.h" |
| @@ -216,6 +219,20 @@ |
| if (!terminate_child_on_shutdown_) |
| return; |
| +#if defined(OS_WIN) |
| + const CommandLine& browser_command_line = |
| + *CommandLine::ForCurrentProcess(); |
| + if (browser_command_line.HasSwitch(switches::kAuditHandles) || |
| + browser_command_line.HasSwitch(switches::kAuditAllHandles)) { |
| + scoped_refptr<content::HandleEnumerator> handle_enum( |
| + new content::HandleEnumerator(process_.handle(), |
| + browser_command_line.HasSwitch(switches::kAuditAllHandles))); |
| + handle_enum->RunHandleEnumeration(); |
| + process_.set_handle(base::kNullProcessHandle); |
| + return; |
| + } |
| +#endif |
| + |
| // On Posix, EnsureProcessTerminated can lead to 2 seconds of sleep! So |
| // don't this on the UI/IO threads. |
| BrowserThread::PostTask( |