| 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/tcp_client_socket_win.h" | 5 #include "net/socket/tcp_client_socket_win.h" |
| 6 | 6 |
| 7 #include <mstcpip.h> | 7 #include <mstcpip.h> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 } | 667 } |
| 668 | 668 |
| 669 int64 TCPClientSocketWin::NumBytesRead() const { | 669 int64 TCPClientSocketWin::NumBytesRead() const { |
| 670 return num_bytes_read_; | 670 return num_bytes_read_; |
| 671 } | 671 } |
| 672 | 672 |
| 673 base::TimeDelta TCPClientSocketWin::GetConnectTimeMicros() const { | 673 base::TimeDelta TCPClientSocketWin::GetConnectTimeMicros() const { |
| 674 return connect_time_micros_; | 674 return connect_time_micros_; |
| 675 } | 675 } |
| 676 | 676 |
| 677 NextProto TCPClientSocketWin::GetNegotiatedProtocol() const { |
| 678 return kProtoUnknown; |
| 679 } |
| 680 |
| 677 int TCPClientSocketWin::Read(IOBuffer* buf, | 681 int TCPClientSocketWin::Read(IOBuffer* buf, |
| 678 int buf_len, | 682 int buf_len, |
| 679 const CompletionCallback& callback) { | 683 const CompletionCallback& callback) { |
| 680 DCHECK(CalledOnValidThread()); | 684 DCHECK(CalledOnValidThread()); |
| 681 DCHECK_NE(socket_, INVALID_SOCKET); | 685 DCHECK_NE(socket_, INVALID_SOCKET); |
| 682 DCHECK(!waiting_read_); | 686 DCHECK(!waiting_read_); |
| 683 DCHECK(read_callback_.is_null()); | 687 DCHECK(read_callback_.is_null()); |
| 684 DCHECK(!core_->read_iobuffer_); | 688 DCHECK(!core_->read_iobuffer_); |
| 685 | 689 |
| 686 buf_len = core_->ThrottleReadSize(buf_len); | 690 buf_len = core_->ThrottleReadSize(buf_len); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 use_history_.set_was_used_to_convey_data(); | 908 use_history_.set_was_used_to_convey_data(); |
| 905 net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_SENT, num_bytes, | 909 net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_SENT, num_bytes, |
| 906 core_->write_buffer_.buf); | 910 core_->write_buffer_.buf); |
| 907 } | 911 } |
| 908 } | 912 } |
| 909 core_->write_iobuffer_ = NULL; | 913 core_->write_iobuffer_ = NULL; |
| 910 DoWriteCallback(rv); | 914 DoWriteCallback(rv); |
| 911 } | 915 } |
| 912 | 916 |
| 913 } // namespace net | 917 } // namespace net |
| OLD | NEW |