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_message_filter.h" | 5 #include "ipc/ipc_sync_message_filter.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
11 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
12 #include "base/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "ipc/ipc_channel.h" | 13 #include "ipc/ipc_channel.h" |
14 #include "ipc/ipc_sync_message.h" | 14 #include "ipc/ipc_sync_message.h" |
15 | 15 |
16 namespace IPC { | 16 namespace IPC { |
17 | 17 |
18 bool SyncMessageFilter::Send(Message* message) { | 18 bool SyncMessageFilter::Send(Message* message) { |
19 if (!message->is_sync()) { | 19 if (!message->is_sync()) { |
20 { | 20 { |
21 base::AutoLock auto_lock(lock_); | 21 base::AutoLock auto_lock(lock_); |
22 if (sender_ && is_channel_send_thread_safe_) { | 22 if (sender_ && is_channel_send_thread_safe_) { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 for (PendingSyncMessages::iterator iter = pending_sync_messages_.begin(); | 149 for (PendingSyncMessages::iterator iter = pending_sync_messages_.begin(); |
150 iter != pending_sync_messages_.end(); ++iter) { | 150 iter != pending_sync_messages_.end(); ++iter) { |
151 TRACE_EVENT_FLOW_BEGIN0(TRACE_DISABLED_BY_DEFAULT("ipc.flow"), | 151 TRACE_EVENT_FLOW_BEGIN0(TRACE_DISABLED_BY_DEFAULT("ipc.flow"), |
152 "SyncMessageFilter::SignalAllEvents", | 152 "SyncMessageFilter::SignalAllEvents", |
153 (*iter)->done_event); | 153 (*iter)->done_event); |
154 (*iter)->done_event->Signal(); | 154 (*iter)->done_event->Signal(); |
155 } | 155 } |
156 } | 156 } |
157 | 157 |
158 } // namespace IPC | 158 } // namespace IPC |
OLD | NEW |