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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 scoped_refptr<SyncMessageFilter> SyncChannel::CreateSyncMessageFilter() { | 571 scoped_refptr<SyncMessageFilter> SyncChannel::CreateSyncMessageFilter() { |
572 scoped_refptr<SyncMessageFilter> filter = new SyncMessageFilter( | 572 scoped_refptr<SyncMessageFilter> filter = new SyncMessageFilter( |
573 sync_context()->shutdown_event()); | 573 sync_context()->shutdown_event()); |
574 AddFilter(filter.get()); | 574 AddFilter(filter.get()); |
575 if (!did_init()) | 575 if (!did_init()) |
576 pre_init_sync_message_filters_.push_back(filter); | 576 pre_init_sync_message_filters_.push_back(filter); |
577 return filter; | 577 return filter; |
578 } | 578 } |
579 | 579 |
580 bool SyncChannel::Send(Message* message) { | 580 bool SyncChannel::Send(Message* message) { |
581 #if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED) | 581 #ifdef IPC_MESSAGE_LOG_ENABLED |
582 std::string name; | 582 std::string name; |
583 Logging::GetInstance()->GetMessageText( | 583 Logging::GetInstance()->GetMessageText( |
584 message->type(), &name, message, nullptr); | 584 message->type(), &name, message, nullptr); |
585 TRACE_EVENT1("ipc", "SyncChannel::Send", "name", name); | 585 TRACE_EVENT1("ipc", "SyncChannel::Send", "name", name); |
586 #else | 586 #else |
587 TRACE_EVENT2("ipc", "SyncChannel::Send", | 587 TRACE_EVENT2("ipc", "SyncChannel::Send", |
588 "class", IPC_MESSAGE_ID_CLASS(message->type()), | 588 "class", IPC_MESSAGE_ID_CLASS(message->type()), |
589 "line", IPC_MESSAGE_ID_LINE(message->type())); | 589 "line", IPC_MESSAGE_ID_LINE(message->type())); |
590 #endif | 590 #endif |
591 if (!message->is_sync()) { | 591 if (!message->is_sync()) { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 sync_context()->GetDispatchEvent(), | 698 sync_context()->GetDispatchEvent(), |
699 base::Bind(&SyncChannel::OnDispatchEventSignaled, | 699 base::Bind(&SyncChannel::OnDispatchEventSignaled, |
700 base::Unretained(this))); | 700 base::Unretained(this))); |
701 } | 701 } |
702 | 702 |
703 void SyncChannel::OnChannelInit() { | 703 void SyncChannel::OnChannelInit() { |
704 pre_init_sync_message_filters_.clear(); | 704 pre_init_sync_message_filters_.clear(); |
705 } | 705 } |
706 | 706 |
707 } // namespace IPC | 707 } // namespace IPC |
OLD | NEW |