| 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_nacl.h" | 5 #include "ipc/ipc_channel_nacl.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 | 10 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 reader_thread_->Join(); | 193 reader_thread_->Join(); |
| 194 close(pipe_); | 194 close(pipe_); |
| 195 pipe_ = -1; | 195 pipe_ = -1; |
| 196 reader_thread_runner_.reset(); | 196 reader_thread_runner_.reset(); |
| 197 reader_thread_.reset(); | 197 reader_thread_.reset(); |
| 198 read_queue_.clear(); | 198 read_queue_.clear(); |
| 199 output_queue_.clear(); | 199 output_queue_.clear(); |
| 200 } | 200 } |
| 201 | 201 |
| 202 bool ChannelNacl::Send(Message* message) { | 202 bool ChannelNacl::Send(Message* message) { |
| 203 DCHECK(!message->HasAttachments()); |
| 203 DVLOG(2) << "sending message @" << message << " on channel @" << this | 204 DVLOG(2) << "sending message @" << message << " on channel @" << this |
| 204 << " with type " << message->type(); | 205 << " with type " << message->type(); |
| 205 scoped_ptr<Message> message_ptr(message); | 206 scoped_ptr<Message> message_ptr(message); |
| 206 | 207 |
| 207 #ifdef IPC_MESSAGE_LOG_ENABLED | 208 #ifdef IPC_MESSAGE_LOG_ENABLED |
| 208 Logging::GetInstance()->OnSendMessage(message_ptr.get(), ""); | 209 Logging::GetInstance()->OnSendMessage(message_ptr.get(), ""); |
| 209 #endif // IPC_MESSAGE_LOG_ENABLED | 210 #endif // IPC_MESSAGE_LOG_ENABLED |
| 210 | 211 |
| 211 message->TraceMessageBegin(); | 212 message->TraceMessageBegin(); |
| 212 output_queue_.push_back(linked_ptr<Message>(message_ptr.release())); | 213 output_queue_.push_back(linked_ptr<Message>(message_ptr.release())); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 // Channel's methods | 372 // Channel's methods |
| 372 | 373 |
| 373 // static | 374 // static |
| 374 scoped_ptr<Channel> Channel::Create( | 375 scoped_ptr<Channel> Channel::Create( |
| 375 const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) { | 376 const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) { |
| 376 return scoped_ptr<Channel>( | 377 return scoped_ptr<Channel>( |
| 377 new ChannelNacl(channel_handle, mode, listener)); | 378 new ChannelNacl(channel_handle, mode, listener)); |
| 378 } | 379 } |
| 379 | 380 |
| 380 } // namespace IPC | 381 } // namespace IPC |
| OLD | NEW |