| 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 DVLOG(2) << "sent message @" << msg << " on channel @" << this | 549 DVLOG(2) << "sent message @" << msg << " on channel @" << this |
| 550 << " with type " << msg->type() << " on fd " << pipe_.get(); | 550 << " with type " << msg->type() << " on fd " << pipe_.get(); |
| 551 delete output_queue_.front(); | 551 delete output_queue_.front(); |
| 552 output_queue_.pop(); | 552 output_queue_.pop(); |
| 553 } | 553 } |
| 554 } | 554 } |
| 555 return true; | 555 return true; |
| 556 } | 556 } |
| 557 | 557 |
| 558 bool ChannelPosix::Send(Message* message) { | 558 bool ChannelPosix::Send(Message* message) { |
| 559 DCHECK(!message->HasMojoHandles()); |
| 559 DVLOG(2) << "sending message @" << message << " on channel @" << this | 560 DVLOG(2) << "sending message @" << message << " on channel @" << this |
| 560 << " with type " << message->type() | 561 << " with type " << message->type() |
| 561 << " (" << output_queue_.size() << " in queue)"; | 562 << " (" << output_queue_.size() << " in queue)"; |
| 562 | 563 |
| 563 #ifdef IPC_MESSAGE_LOG_ENABLED | 564 #ifdef IPC_MESSAGE_LOG_ENABLED |
| 564 Logging::GetInstance()->OnSendMessage(message, ""); | 565 Logging::GetInstance()->OnSendMessage(message, ""); |
| 565 #endif // IPC_MESSAGE_LOG_ENABLED | 566 #endif // IPC_MESSAGE_LOG_ENABLED |
| 566 | 567 |
| 567 message->TraceMessageBegin(); | 568 message->TraceMessageBegin(); |
| 568 output_queue_.push(message); | 569 output_queue_.push(message); |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 } | 1136 } |
| 1136 | 1137 |
| 1137 #if defined(OS_LINUX) | 1138 #if defined(OS_LINUX) |
| 1138 // static | 1139 // static |
| 1139 void Channel::SetGlobalPid(int pid) { | 1140 void Channel::SetGlobalPid(int pid) { |
| 1140 ChannelPosix::SetGlobalPid(pid); | 1141 ChannelPosix::SetGlobalPid(pid); |
| 1141 } | 1142 } |
| 1142 #endif // OS_LINUX | 1143 #endif // OS_LINUX |
| 1143 | 1144 |
| 1144 } // namespace IPC | 1145 } // namespace IPC |
| OLD | NEW |