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

Side by Side Diff: content/child/child_thread_impl.cc

Issue 1334593002: Reland #2 "ipc: Add a new field num_brokered_attachments to the message header." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and type error. Created 5 years, 3 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
« no previous file with comments | « content/browser/loader/async_resource_handler.cc ('k') | content/child/resource_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/child/child_thread_impl.h" 5 #include "content/child/child_thread_impl.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "content/child/power_monitor_broadcast_source.h" 44 #include "content/child/power_monitor_broadcast_source.h"
45 #include "content/child/push_messaging/push_dispatcher.h" 45 #include "content/child/push_messaging/push_dispatcher.h"
46 #include "content/child/quota_dispatcher.h" 46 #include "content/child/quota_dispatcher.h"
47 #include "content/child/quota_message_filter.h" 47 #include "content/child/quota_message_filter.h"
48 #include "content/child/resource_dispatcher.h" 48 #include "content/child/resource_dispatcher.h"
49 #include "content/child/service_worker/service_worker_message_filter.h" 49 #include "content/child/service_worker/service_worker_message_filter.h"
50 #include "content/child/thread_safe_sender.h" 50 #include "content/child/thread_safe_sender.h"
51 #include "content/child/websocket_dispatcher.h" 51 #include "content/child/websocket_dispatcher.h"
52 #include "content/common/child_process_messages.h" 52 #include "content/common/child_process_messages.h"
53 #include "content/common/in_process_child_thread_params.h" 53 #include "content/common/in_process_child_thread_params.h"
54 #include "content/common/resource_messages.h"
54 #include "content/public/common/content_switches.h" 55 #include "content/public/common/content_switches.h"
55 #include "ipc/attachment_broker_unprivileged.h" 56 #include "ipc/attachment_broker_unprivileged.h"
57 #include "ipc/ipc_channel.h"
56 #include "ipc/ipc_logging.h" 58 #include "ipc/ipc_logging.h"
57 #include "ipc/ipc_switches.h" 59 #include "ipc/ipc_switches.h"
58 #include "ipc/ipc_sync_channel.h" 60 #include "ipc/ipc_sync_channel.h"
59 #include "ipc/ipc_sync_message_filter.h" 61 #include "ipc/ipc_sync_message_filter.h"
60 #include "ipc/mojo/ipc_channel_mojo.h" 62 #include "ipc/mojo/ipc_channel_mojo.h"
61 63
62 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) 64 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED)
63 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" 65 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h"
64 #endif 66 #endif
65 67
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 } 391 }
390 #endif 392 #endif
391 393
392 channel_ = 394 channel_ =
393 IPC::SyncChannel::Create(this, ChildProcess::current()->io_task_runner(), 395 IPC::SyncChannel::Create(this, ChildProcess::current()->io_task_runner(),
394 ChildProcess::current()->GetShutDownEvent()); 396 ChildProcess::current()->GetShutDownEvent());
395 #ifdef IPC_MESSAGE_LOG_ENABLED 397 #ifdef IPC_MESSAGE_LOG_ENABLED
396 if (!IsInBrowserProcess()) 398 if (!IsInBrowserProcess())
397 IPC::Logging::GetInstance()->SetIPCSender(this); 399 IPC::Logging::GetInstance()->SetIPCSender(this);
398 #endif 400 #endif
401 // TODO(erikchen): Temporary code to help track http://crbug.com/527588.
402 IPC::Channel::SetMessageVerifier(
403 &content::CheckContentsOfDataReceivedMessage);
399 404
400 mojo_application_.reset(new MojoApplication(GetIOTaskRunner())); 405 mojo_application_.reset(new MojoApplication(GetIOTaskRunner()));
401 406
402 sync_message_filter_ = channel_->CreateSyncMessageFilter(); 407 sync_message_filter_ = channel_->CreateSyncMessageFilter();
403 thread_safe_sender_ = new ThreadSafeSender( 408 thread_safe_sender_ = new ThreadSafeSender(
404 message_loop_->task_runner(), sync_message_filter_.get()); 409 message_loop_->task_runner(), sync_message_filter_.get());
405 410
406 resource_dispatcher_.reset(new ResourceDispatcher( 411 resource_dispatcher_.reset(new ResourceDispatcher(
407 this, message_loop()->task_runner())); 412 this, message_loop()->task_runner()));
408 websocket_dispatcher_.reset(new WebSocketDispatcher); 413 websocket_dispatcher_.reset(new WebSocketDispatcher);
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 void ChildThreadImpl::EnsureConnected() { 743 void ChildThreadImpl::EnsureConnected() {
739 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; 744 VLOG(0) << "ChildThreadImpl::EnsureConnected()";
740 base::Process::Current().Terminate(0, false); 745 base::Process::Current().Terminate(0, false);
741 } 746 }
742 747
743 bool ChildThreadImpl::IsInBrowserProcess() const { 748 bool ChildThreadImpl::IsInBrowserProcess() const {
744 return browser_process_io_runner_; 749 return browser_process_io_runner_;
745 } 750 }
746 751
747 } // namespace content 752 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/async_resource_handler.cc ('k') | content/child/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698