| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/browser_child_process_host_impl.h" | 5 #include "content/browser/browser_child_process_host_impl.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/dump_without_crashing.h" | 10 #include "base/debug/dump_without_crashing.h" |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 "465841 BrowserChildProcessHostImpl::OnProcessLaunched")); | 369 "465841 BrowserChildProcessHostImpl::OnProcessLaunched")); |
| 370 const base::Process& process = child_process_->GetProcess(); | 370 const base::Process& process = child_process_->GetProcess(); |
| 371 DCHECK(process.IsValid()); | 371 DCHECK(process.IsValid()); |
| 372 | 372 |
| 373 #if defined(OS_WIN) | 373 #if defined(OS_WIN) |
| 374 // Start a WaitableEventWatcher that will invoke OnProcessExitedEarly if the | 374 // Start a WaitableEventWatcher that will invoke OnProcessExitedEarly if the |
| 375 // child process exits. This watcher is stopped once the IPC channel is | 375 // child process exits. This watcher is stopped once the IPC channel is |
| 376 // connected and the exit of the child process is detecter by an error on the | 376 // connected and the exit of the child process is detecter by an error on the |
| 377 // IPC channel thereafter. | 377 // IPC channel thereafter. |
| 378 DCHECK(!early_exit_watcher_.GetWatchedObject()); | 378 DCHECK(!early_exit_watcher_.GetWatchedObject()); |
| 379 early_exit_watcher_.StartWatching(process.Handle(), this); | 379 early_exit_watcher_.StartWatching(process.Handle(), this, false); |
| 380 #endif | 380 #endif |
| 381 | 381 |
| 382 // TODO(rvargas) crbug.com/417532: Don't store a handle. | 382 // TODO(rvargas) crbug.com/417532: Don't store a handle. |
| 383 data_.handle = process.Handle(); | 383 data_.handle = process.Handle(); |
| 384 delegate_->OnProcessLaunched(); | 384 delegate_->OnProcessLaunched(); |
| 385 } | 385 } |
| 386 | 386 |
| 387 #if defined(OS_WIN) | 387 #if defined(OS_WIN) |
| 388 | 388 |
| 389 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { | 389 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { |
| 390 OnChildDisconnected(); | 390 OnChildDisconnected(); |
| 391 } | 391 } |
| 392 | 392 |
| 393 #endif | 393 #endif |
| 394 | 394 |
| 395 } // namespace content | 395 } // namespace content |
| OLD | NEW |