| 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/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 delegate_->OnChannelConnected(peer_pid); | 244 delegate_->OnChannelConnected(peer_pid); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void BrowserChildProcessHostImpl::OnChannelError() { | 247 void BrowserChildProcessHostImpl::OnChannelError() { |
| 248 delegate_->OnChannelError(); | 248 delegate_->OnChannelError(); |
| 249 } | 249 } |
| 250 | 250 |
| 251 void BrowserChildProcessHostImpl::OnBadMessageReceived( | 251 void BrowserChildProcessHostImpl::OnBadMessageReceived( |
| 252 const IPC::Message& message) { | 252 const IPC::Message& message) { |
| 253 HistogramBadMessageTerminated(data_.process_type); | 253 HistogramBadMessageTerminated(data_.process_type); |
| 254 if (CommandLine::ForCurrentProcess()->HasSwitch( | 254 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 255 switches::kDisableKillAfterBadIPC)) { | 255 switches::kDisableKillAfterBadIPC)) { |
| 256 return; | 256 return; |
| 257 } | 257 } |
| 258 base::KillProcess(child_process_->GetProcess().Handle(), | 258 base::KillProcess(child_process_->GetProcess().Handle(), |
| 259 RESULT_CODE_KILLED_BAD_MESSAGE, false); | 259 RESULT_CODE_KILLED_BAD_MESSAGE, false); |
| 260 } | 260 } |
| 261 | 261 |
| 262 bool BrowserChildProcessHostImpl::CanShutdown() { | 262 bool BrowserChildProcessHostImpl::CanShutdown() { |
| 263 return delegate_->CanShutdown(); | 263 return delegate_->CanShutdown(); |
| 264 } | 264 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 339 |
| 340 #if defined(OS_WIN) | 340 #if defined(OS_WIN) |
| 341 | 341 |
| 342 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { | 342 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { |
| 343 OnChildDisconnected(); | 343 OnChildDisconnected(); |
| 344 } | 344 } |
| 345 | 345 |
| 346 #endif | 346 #endif |
| 347 | 347 |
| 348 } // namespace content | 348 } // namespace content |
| OLD | NEW |