Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: net/socket/tcp_client_socket_win.cc

Issue 9958028: Add a new GetNegotiatedProtocol method to StreamSocket and implement in all subclasses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/tcp_client_socket_win.h ('k') | net/socket/transport_client_socket_pool_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_win.h ('k') | net/socket/transport_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698