| 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 "net/socket/buffered_write_stream_socket.h" | 5 #include "net/socket/buffered_write_stream_socket.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } | 76 } |
| 77 | 77 |
| 78 bool BufferedWriteStreamSocket::IsConnected() const { | 78 bool BufferedWriteStreamSocket::IsConnected() const { |
| 79 return wrapped_socket_->IsConnected(); | 79 return wrapped_socket_->IsConnected(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 bool BufferedWriteStreamSocket::IsConnectedAndIdle() const { | 82 bool BufferedWriteStreamSocket::IsConnectedAndIdle() const { |
| 83 return wrapped_socket_->IsConnectedAndIdle(); | 83 return wrapped_socket_->IsConnectedAndIdle(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 int BufferedWriteStreamSocket::GetPeerAddress(AddressList* address) const { | 86 int BufferedWriteStreamSocket::GetPeerAddress(IPEndPoint* address) const { |
| 87 return wrapped_socket_->GetPeerAddress(address); | 87 return wrapped_socket_->GetPeerAddress(address); |
| 88 } | 88 } |
| 89 | 89 |
| 90 int BufferedWriteStreamSocket::GetLocalAddress(IPEndPoint* address) const { | 90 int BufferedWriteStreamSocket::GetLocalAddress(IPEndPoint* address) const { |
| 91 return wrapped_socket_->GetLocalAddress(address); | 91 return wrapped_socket_->GetLocalAddress(address); |
| 92 } | 92 } |
| 93 | 93 |
| 94 const BoundNetLog& BufferedWriteStreamSocket::NetLog() const { | 94 const BoundNetLog& BufferedWriteStreamSocket::NetLog() const { |
| 95 return wrapped_socket_->NetLog(); | 95 return wrapped_socket_->NetLog(); |
| 96 } | 96 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 io_buffer_->set_offset(io_buffer_->offset() + result); | 151 io_buffer_->set_offset(io_buffer_->offset() + result); |
| 152 if (io_buffer_->RemainingCapacity()) { | 152 if (io_buffer_->RemainingCapacity()) { |
| 153 DoDelayedWrite(); | 153 DoDelayedWrite(); |
| 154 } else { | 154 } else { |
| 155 io_buffer_->SetCapacity(0); | 155 io_buffer_->SetCapacity(0); |
| 156 } | 156 } |
| 157 } | 157 } |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace net | 160 } // namespace net |
| OLD | NEW |