| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 CloseHandle(pipe_); | 163 CloseHandle(pipe_); |
| 164 pipe_ = INVALID_HANDLE_VALUE; | 164 pipe_ = INVALID_HANDLE_VALUE; |
| 165 return false; | 165 return false; |
| 166 } | 166 } |
| 167 | 167 |
| 168 output_queue_.push(m.release()); | 168 output_queue_.push(m.release()); |
| 169 return true; | 169 return true; |
| 170 } | 170 } |
| 171 | 171 |
| 172 bool Channel::ChannelImpl::Connect() { | 172 bool Channel::ChannelImpl::Connect() { |
| 173 DLOG(WARNING) << "Connect called twice"; | 173 DLOG_IF(WARNING, thread_check_.get()) << "Connect called more than once"; |
| 174 | 174 |
| 175 if (!thread_check_.get()) | 175 if (!thread_check_.get()) |
| 176 thread_check_.reset(new NonThreadSafe()); | 176 thread_check_.reset(new NonThreadSafe()); |
| 177 | 177 |
| 178 if (pipe_ == INVALID_HANDLE_VALUE) | 178 if (pipe_ == INVALID_HANDLE_VALUE) |
| 179 return false; | 179 return false; |
| 180 | 180 |
| 181 MessageLoopForIO::current()->RegisterIOHandler(pipe_, this); | 181 MessageLoopForIO::current()->RegisterIOHandler(pipe_, this); |
| 182 | 182 |
| 183 // Check to see if there is a client connected to our pipe... | 183 // Check to see if there is a client connected to our pipe... |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 | 433 |
| 434 void Channel::set_listener(Listener* listener) { | 434 void Channel::set_listener(Listener* listener) { |
| 435 channel_impl_->set_listener(listener); | 435 channel_impl_->set_listener(listener); |
| 436 } | 436 } |
| 437 | 437 |
| 438 bool Channel::Send(Message* message) { | 438 bool Channel::Send(Message* message) { |
| 439 return channel_impl_->Send(message); | 439 return channel_impl_->Send(message); |
| 440 } | 440 } |
| 441 | 441 |
| 442 } // namespace IPC | 442 } // namespace IPC |
| OLD | NEW |