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

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

Issue 10491007: fixed issue 128383 - replace GetPeerAddress(AddressList* address) with GetPeerAddress(IPEndPoint* a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix according to review Created 8 years, 6 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_libevent.h ('k') | net/socket/tcp_client_socket_win.h » ('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.h" 5 #include "net/socket/tcp_client_socket.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <netdb.h> 9 #include <netdb.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 } 688 }
689 689
690 if (result != ERR_IO_PENDING) { 690 if (result != ERR_IO_PENDING) {
691 write_buf_ = NULL; 691 write_buf_ = NULL;
692 write_buf_len_ = 0; 692 write_buf_len_ = 0;
693 write_socket_watcher_.StopWatchingFileDescriptor(); 693 write_socket_watcher_.StopWatchingFileDescriptor();
694 DoWriteCallback(result); 694 DoWriteCallback(result);
695 } 695 }
696 } 696 }
697 697
698 int TCPClientSocketLibevent::GetPeerAddress(AddressList* address) const { 698 int TCPClientSocketLibevent::GetPeerAddress(IPEndPoint* address) const {
699 DCHECK(CalledOnValidThread()); 699 DCHECK(CalledOnValidThread());
700 DCHECK(address); 700 DCHECK(address);
701 if (!IsConnected()) 701 if (!IsConnected())
702 return ERR_SOCKET_NOT_CONNECTED; 702 return ERR_SOCKET_NOT_CONNECTED;
703 *address = AddressList(addresses_[current_address_index_]); 703 *address = addresses_[current_address_index_];
704 return OK; 704 return OK;
705 } 705 }
706 706
707 int TCPClientSocketLibevent::GetLocalAddress(IPEndPoint* address) const { 707 int TCPClientSocketLibevent::GetLocalAddress(IPEndPoint* address) const {
708 DCHECK(CalledOnValidThread()); 708 DCHECK(CalledOnValidThread());
709 DCHECK(address); 709 DCHECK(address);
710 if (!IsConnected()) 710 if (!IsConnected())
711 return ERR_SOCKET_NOT_CONNECTED; 711 return ERR_SOCKET_NOT_CONNECTED;
712 712
713 SockaddrStorage storage; 713 SockaddrStorage storage;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 745
746 base::TimeDelta TCPClientSocketLibevent::GetConnectTimeMicros() const { 746 base::TimeDelta TCPClientSocketLibevent::GetConnectTimeMicros() const {
747 return connect_time_micros_; 747 return connect_time_micros_;
748 } 748 }
749 749
750 NextProto TCPClientSocketLibevent::GetNegotiatedProtocol() const { 750 NextProto TCPClientSocketLibevent::GetNegotiatedProtocol() const {
751 return kProtoUnknown; 751 return kProtoUnknown;
752 } 752 }
753 753
754 } // namespace net 754 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_libevent.h ('k') | net/socket/tcp_client_socket_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698