OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_TCP_CONNECT, rv); | 798 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_TCP_CONNECT, rv); |
799 return; | 799 return; |
800 } | 800 } |
801 | 801 |
802 const std::string source_address_str = | 802 const std::string source_address_str = |
803 NetAddressToStringWithPort( | 803 NetAddressToStringWithPort( |
804 reinterpret_cast<const struct sockaddr*>(&source_address), | 804 reinterpret_cast<const struct sockaddr*>(&source_address), |
805 sizeof(source_address)); | 805 sizeof(source_address)); |
806 net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT, | 806 net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT, |
807 make_scoped_refptr(new NetLogStringParameter( | 807 make_scoped_refptr(new NetLogStringParameter( |
808 "source address", | 808 "source_address", |
809 source_address_str))); | 809 source_address_str))); |
810 } | 810 } |
811 | 811 |
812 void TCPClientSocketWin::DoReadCallback(int rv) { | 812 void TCPClientSocketWin::DoReadCallback(int rv) { |
813 DCHECK_NE(rv, ERR_IO_PENDING); | 813 DCHECK_NE(rv, ERR_IO_PENDING); |
814 DCHECK(read_callback_); | 814 DCHECK(read_callback_); |
815 | 815 |
816 // since Run may result in Read being called, clear read_callback_ up front. | 816 // since Run may result in Read being called, clear read_callback_ up front. |
817 OldCompletionCallback* c = read_callback_; | 817 OldCompletionCallback* c = read_callback_; |
818 read_callback_ = NULL; | 818 read_callback_ = NULL; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 use_history_.set_was_used_to_convey_data(); | 904 use_history_.set_was_used_to_convey_data(); |
905 net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_SENT, num_bytes, | 905 net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_SENT, num_bytes, |
906 core_->write_buffer_.buf); | 906 core_->write_buffer_.buf); |
907 } | 907 } |
908 } | 908 } |
909 core_->write_iobuffer_ = NULL; | 909 core_->write_iobuffer_ = NULL; |
910 DoWriteCallback(rv); | 910 DoWriteCallback(rv); |
911 } | 911 } |
912 | 912 |
913 } // namespace net | 913 } // namespace net |
OLD | NEW |