| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_win.h" | 5 #include "ipc/ipc_channel_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <sddl.h> | 8 #include <sddl.h> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 | 147 |
| 148 bool Channel::ChannelImpl::Send(Message* message) { | 148 bool Channel::ChannelImpl::Send(Message* message) { |
| 149 DCHECK(thread_check_->CalledOnValidThread()); | 149 DCHECK(thread_check_->CalledOnValidThread()); |
| 150 DVLOG(2) << "sending message @" << message << " on channel @" << this | 150 DVLOG(2) << "sending message @" << message << " on channel @" << this |
| 151 << " with type " << message->type() | 151 << " with type " << message->type() |
| 152 << " (" << output_queue_.size() << " in queue)"; | 152 << " (" << output_queue_.size() << " in queue)"; |
| 153 | 153 |
| 154 #ifdef IPC_MESSAGE_LOG_ENABLED | 154 #ifdef IPC_MESSAGE_LOG_ENABLED |
| 155 Logging::current()->OnSendMessage(message, ""); | 155 Logging::GetInstance()->OnSendMessage(message, ""); |
| 156 #endif | 156 #endif |
| 157 | 157 |
| 158 output_queue_.push(message); | 158 output_queue_.push(message); |
| 159 // ensure waiting to write | 159 // ensure waiting to write |
| 160 if (!waiting_connect_) { | 160 if (!waiting_connect_) { |
| 161 if (!output_state_.is_pending) { | 161 if (!output_state_.is_pending) { |
| 162 if (!ProcessOutgoingMessages(NULL, 0)) | 162 if (!ProcessOutgoingMessages(NULL, 0)) |
| 163 return false; | 163 return false; |
| 164 } | 164 } |
| 165 } | 165 } |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 | 488 |
| 489 void Channel::set_listener(Listener* listener) { | 489 void Channel::set_listener(Listener* listener) { |
| 490 channel_impl_->set_listener(listener); | 490 channel_impl_->set_listener(listener); |
| 491 } | 491 } |
| 492 | 492 |
| 493 bool Channel::Send(Message* message) { | 493 bool Channel::Send(Message* message) { |
| 494 return channel_impl_->Send(message); | 494 return channel_impl_->Send(message); |
| 495 } | 495 } |
| 496 | 496 |
| 497 } // namespace IPC | 497 } // namespace IPC |
| OLD | NEW |