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

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

Issue 8200011: Add NetLog support to UDP sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Hex encode bytes Created 9 years, 2 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
OLDNEW
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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_TCP_CONNECT, rv); 792 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_TCP_CONNECT, rv);
793 return; 793 return;
794 } 794 }
795 795
796 const std::string source_address_str = 796 const std::string source_address_str =
797 NetAddressToStringWithPort( 797 NetAddressToStringWithPort(
798 reinterpret_cast<const struct sockaddr*>(&source_address), 798 reinterpret_cast<const struct sockaddr*>(&source_address),
799 sizeof(source_address)); 799 sizeof(source_address));
800 net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT, 800 net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT,
801 make_scoped_refptr(new NetLogStringParameter( 801 make_scoped_refptr(new NetLogStringParameter(
802 "source address", 802 "source_address",
803 source_address_str))); 803 source_address_str)));
804 } 804 }
805 805
806 void TCPClientSocketWin::DoReadCallback(int rv) { 806 void TCPClientSocketWin::DoReadCallback(int rv) {
807 DCHECK_NE(rv, ERR_IO_PENDING); 807 DCHECK_NE(rv, ERR_IO_PENDING);
808 DCHECK(read_callback_); 808 DCHECK(read_callback_);
809 809
810 // since Run may result in Read being called, clear read_callback_ up front. 810 // since Run may result in Read being called, clear read_callback_ up front.
811 OldCompletionCallback* c = read_callback_; 811 OldCompletionCallback* c = read_callback_;
812 read_callback_ = NULL; 812 read_callback_ = NULL;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 use_history_.set_was_used_to_convey_data(); 898 use_history_.set_was_used_to_convey_data();
899 net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_SENT, num_bytes, 899 net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_SENT, num_bytes,
900 core_->write_buffer_.buf); 900 core_->write_buffer_.buf);
901 } 901 }
902 } 902 }
903 core_->write_iobuffer_ = NULL; 903 core_->write_iobuffer_ = NULL;
904 DoWriteCallback(rv); 904 DoWriteCallback(rv);
905 } 905 }
906 906
907 } // namespace net 907 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698