| 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 "ipc/ipc_sync_channel.h" | 5 #include "ipc/ipc_sync_channel.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 return base::Bind(&SyncChannel::SyncContext::OnWaitableEventSignaled, this); | 405 return base::Bind(&SyncChannel::SyncContext::OnWaitableEventSignaled, this); |
| 406 } | 406 } |
| 407 | 407 |
| 408 // static | 408 // static |
| 409 scoped_ptr<SyncChannel> SyncChannel::Create( | 409 scoped_ptr<SyncChannel> SyncChannel::Create( |
| 410 const IPC::ChannelHandle& channel_handle, | 410 const IPC::ChannelHandle& channel_handle, |
| 411 Channel::Mode mode, | 411 Channel::Mode mode, |
| 412 Listener* listener, | 412 Listener* listener, |
| 413 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner, | 413 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner, |
| 414 bool create_pipe_now, | 414 bool create_pipe_now, |
| 415 base::WaitableEvent* shutdown_event, | 415 base::WaitableEvent* shutdown_event) { |
| 416 AttachmentBroker* broker) { | |
| 417 scoped_ptr<SyncChannel> channel = | 416 scoped_ptr<SyncChannel> channel = |
| 418 Create(listener, ipc_task_runner, shutdown_event); | 417 Create(listener, ipc_task_runner, shutdown_event); |
| 419 channel->Init(channel_handle, mode, create_pipe_now, broker); | 418 channel->Init(channel_handle, mode, create_pipe_now); |
| 420 return channel.Pass(); | 419 return channel.Pass(); |
| 421 } | 420 } |
| 422 | 421 |
| 423 // static | 422 // static |
| 424 scoped_ptr<SyncChannel> SyncChannel::Create( | 423 scoped_ptr<SyncChannel> SyncChannel::Create( |
| 425 scoped_ptr<ChannelFactory> factory, | 424 scoped_ptr<ChannelFactory> factory, |
| 426 Listener* listener, | 425 Listener* listener, |
| 427 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner, | 426 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner, |
| 428 bool create_pipe_now, | 427 bool create_pipe_now, |
| 429 base::WaitableEvent* shutdown_event) { | 428 base::WaitableEvent* shutdown_event) { |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 | 595 |
| 597 void SyncChannel::OnChannelInit() { | 596 void SyncChannel::OnChannelInit() { |
| 598 for (const auto& filter : pre_init_sync_message_filters_) { | 597 for (const auto& filter : pre_init_sync_message_filters_) { |
| 599 filter->set_is_channel_send_thread_safe( | 598 filter->set_is_channel_send_thread_safe( |
| 600 context()->IsChannelSendThreadSafe()); | 599 context()->IsChannelSendThreadSafe()); |
| 601 } | 600 } |
| 602 pre_init_sync_message_filters_.clear(); | 601 pre_init_sync_message_filters_.clear(); |
| 603 } | 602 } |
| 604 | 603 |
| 605 } // namespace IPC | 604 } // namespace IPC |
| OLD | NEW |