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_channel_posix.h" | 5 #include "ipc/ipc_channel_posix.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 | 624 |
625 bool Channel::ChannelImpl::Send(Message* message) { | 625 bool Channel::ChannelImpl::Send(Message* message) { |
626 DVLOG(2) << "sending message @" << message << " on channel @" << this | 626 DVLOG(2) << "sending message @" << message << " on channel @" << this |
627 << " with type " << message->type() | 627 << " with type " << message->type() |
628 << " (" << output_queue_.size() << " in queue)"; | 628 << " (" << output_queue_.size() << " in queue)"; |
629 | 629 |
630 #ifdef IPC_MESSAGE_LOG_ENABLED | 630 #ifdef IPC_MESSAGE_LOG_ENABLED |
631 Logging::GetInstance()->OnSendMessage(message, ""); | 631 Logging::GetInstance()->OnSendMessage(message, ""); |
632 #endif // IPC_MESSAGE_LOG_ENABLED | 632 #endif // IPC_MESSAGE_LOG_ENABLED |
633 | 633 |
| 634 message->TraceMessageStep(); |
634 output_queue_.push(message); | 635 output_queue_.push(message); |
635 if (!is_blocked_on_write_ && !waiting_connect_) { | 636 if (!is_blocked_on_write_ && !waiting_connect_) { |
636 return ProcessOutgoingMessages(); | 637 return ProcessOutgoingMessages(); |
637 } | 638 } |
638 | 639 |
639 return true; | 640 return true; |
640 } | 641 } |
641 | 642 |
642 int Channel::ChannelImpl::GetClientFileDescriptor() { | 643 int Channel::ChannelImpl::GetClientFileDescriptor() { |
643 base::AutoLock lock(client_pipe_lock_); | 644 base::AutoLock lock(client_pipe_lock_); |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 | 1187 |
1187 | 1188 |
1188 #if defined(OS_LINUX) | 1189 #if defined(OS_LINUX) |
1189 // static | 1190 // static |
1190 void Channel::SetGlobalPid(int pid) { | 1191 void Channel::SetGlobalPid(int pid) { |
1191 ChannelImpl::SetGlobalPid(pid); | 1192 ChannelImpl::SetGlobalPid(pid); |
1192 } | 1193 } |
1193 #endif // OS_LINUX | 1194 #endif // OS_LINUX |
1194 | 1195 |
1195 } // namespace IPC | 1196 } // namespace IPC |
OLD | NEW |