Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: content/browser/browser_child_process_host_impl.cc

Issue 292443004: Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill their child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 delegate_->OnChannelConnected(peer_pid); 254 delegate_->OnChannelConnected(peer_pid);
255 } 255 }
256 256
257 void BrowserChildProcessHostImpl::OnChannelError() { 257 void BrowserChildProcessHostImpl::OnChannelError() {
258 delegate_->OnChannelError(); 258 delegate_->OnChannelError();
259 } 259 }
260 260
261 void BrowserChildProcessHostImpl::OnBadMessageReceived( 261 void BrowserChildProcessHostImpl::OnBadMessageReceived(
262 const IPC::Message& message) { 262 const IPC::Message& message) {
263 HistogramBadMessageTerminated(data_.process_type); 263 HistogramBadMessageTerminated(data_.process_type);
264 if (CommandLine::ForCurrentProcess()->HasSwitch(
265 switches::kDisableKillAfterBadIPC)) {
266 return;
267 }
264 base::KillProcess(GetHandle(), RESULT_CODE_KILLED_BAD_MESSAGE, false); 268 base::KillProcess(GetHandle(), RESULT_CODE_KILLED_BAD_MESSAGE, false);
265 } 269 }
266 270
267 bool BrowserChildProcessHostImpl::CanShutdown() { 271 bool BrowserChildProcessHostImpl::CanShutdown() {
268 return delegate_->CanShutdown(); 272 return delegate_->CanShutdown();
269 } 273 }
270 274
271 void BrowserChildProcessHostImpl::OnChildDisconnected() { 275 void BrowserChildProcessHostImpl::OnChildDisconnected() {
272 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 276 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
273 if (child_process_.get() || data_.handle) { 277 if (child_process_.get() || data_.handle) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 363
360 void BrowserChildProcessHostImpl::OnProcessExitedEarly( 364 void BrowserChildProcessHostImpl::OnProcessExitedEarly(
361 base::WaitableEvent* event) { 365 base::WaitableEvent* event) {
362 DeleteProcessWaitableEvent(event); 366 DeleteProcessWaitableEvent(event);
363 OnChildDisconnected(); 367 OnChildDisconnected();
364 } 368 }
365 369
366 #endif 370 #endif
367 371
368 } // namespace content 372 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_dispatcher_host.cc ('k') | content/browser/browser_plugin/browser_plugin_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698