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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 } | 677 } |
678 | 678 |
679 int64 TCPClientSocketWin::NumBytesRead() const { | 679 int64 TCPClientSocketWin::NumBytesRead() const { |
680 return num_bytes_read_; | 680 return num_bytes_read_; |
681 } | 681 } |
682 | 682 |
683 base::TimeDelta TCPClientSocketWin::GetConnectTimeMicros() const { | 683 base::TimeDelta TCPClientSocketWin::GetConnectTimeMicros() const { |
684 return connect_time_micros_; | 684 return connect_time_micros_; |
685 } | 685 } |
686 | 686 |
| 687 bool TCPClientSocketWin::WasNpnNegotiated() const { |
| 688 return false; |
| 689 } |
| 690 |
687 NextProto TCPClientSocketWin::GetNegotiatedProtocol() const { | 691 NextProto TCPClientSocketWin::GetNegotiatedProtocol() const { |
688 return kProtoUnknown; | 692 return kProtoUnknown; |
689 } | 693 } |
690 | 694 |
| 695 bool TCPClientSocketWin::GetSSLInfo(SSLInfo* ssl_info) { |
| 696 return false; |
| 697 } |
| 698 |
691 int TCPClientSocketWin::Read(IOBuffer* buf, | 699 int TCPClientSocketWin::Read(IOBuffer* buf, |
692 int buf_len, | 700 int buf_len, |
693 const CompletionCallback& callback) { | 701 const CompletionCallback& callback) { |
694 DCHECK(CalledOnValidThread()); | 702 DCHECK(CalledOnValidThread()); |
695 DCHECK_NE(socket_, INVALID_SOCKET); | 703 DCHECK_NE(socket_, INVALID_SOCKET); |
696 DCHECK(!waiting_read_); | 704 DCHECK(!waiting_read_); |
697 DCHECK(read_callback_.is_null()); | 705 DCHECK(read_callback_.is_null()); |
698 DCHECK(!core_->read_iobuffer_); | 706 DCHECK(!core_->read_iobuffer_); |
699 | 707 |
700 buf_len = core_->ThrottleReadSize(buf_len); | 708 buf_len = core_->ThrottleReadSize(buf_len); |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 use_history_.set_was_used_to_convey_data(); | 949 use_history_.set_was_used_to_convey_data(); |
942 net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_SENT, num_bytes, | 950 net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_SENT, num_bytes, |
943 core_->write_buffer_.buf); | 951 core_->write_buffer_.buf); |
944 } | 952 } |
945 } | 953 } |
946 core_->write_iobuffer_ = NULL; | 954 core_->write_iobuffer_ = NULL; |
947 DoWriteCallback(rv); | 955 DoWriteCallback(rv); |
948 } | 956 } |
949 | 957 |
950 } // namespace net | 958 } // namespace net |
OLD | NEW |