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/socket.h> | 10 #include <sys/socket.h> |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 bool ChannelPosix::Send(Message* message) { | 504 bool ChannelPosix::Send(Message* message) { |
505 DCHECK(!message->HasMojoHandles()); | 505 DCHECK(!message->HasMojoHandles()); |
506 DVLOG(2) << "sending message @" << message << " on channel @" << this | 506 DVLOG(2) << "sending message @" << message << " on channel @" << this |
507 << " with type " << message->type() | 507 << " with type " << message->type() |
508 << " (" << output_queue_.size() << " in queue)"; | 508 << " (" << output_queue_.size() << " in queue)"; |
509 | 509 |
510 #ifdef IPC_MESSAGE_LOG_ENABLED | 510 #ifdef IPC_MESSAGE_LOG_ENABLED |
511 Logging::GetInstance()->OnSendMessage(message, ""); | 511 Logging::GetInstance()->OnSendMessage(message, ""); |
512 #endif // IPC_MESSAGE_LOG_ENABLED | 512 #endif // IPC_MESSAGE_LOG_ENABLED |
513 | 513 |
| 514 TRACE_EVENT_WITH_FLOW0("ipc", "ChannelPosix::Send", message->flags(), |
| 515 TRACE_EVENT_FLAG_FLOW_OUT); |
514 message->TraceMessageBegin(); | 516 message->TraceMessageBegin(); |
515 output_queue_.push(message); | 517 output_queue_.push(message); |
516 if (!is_blocked_on_write_ && !waiting_connect_) { | 518 if (!is_blocked_on_write_ && !waiting_connect_) { |
517 return ProcessOutgoingMessages(); | 519 return ProcessOutgoingMessages(); |
518 } | 520 } |
519 | 521 |
520 return true; | 522 return true; |
521 } | 523 } |
522 | 524 |
523 AttachmentBroker* ChannelPosix::GetAttachmentBroker() { | 525 AttachmentBroker* ChannelPosix::GetAttachmentBroker() { |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 } | 1031 } |
1030 | 1032 |
1031 #if defined(OS_LINUX) | 1033 #if defined(OS_LINUX) |
1032 // static | 1034 // static |
1033 void Channel::SetGlobalPid(int pid) { | 1035 void Channel::SetGlobalPid(int pid) { |
1034 ChannelPosix::SetGlobalPid(pid); | 1036 ChannelPosix::SetGlobalPid(pid); |
1035 } | 1037 } |
1036 #endif // OS_LINUX | 1038 #endif // OS_LINUX |
1037 | 1039 |
1038 } // namespace IPC | 1040 } // namespace IPC |
OLD | NEW |