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

Unified Diff: net/ftp/ftp_network_transaction.cc

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: get_canonical_name -> canonical_name. iterator to indexing Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/dns_transaction_unittest.cc ('k') | net/ftp/ftp_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_network_transaction.cc
diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc
index 322764f6fec318f71e682deb03f82053e94bafb3..a391cad32e85ec23e98e9506bdabf20a39f077bd 100644
--- a/net/ftp/ftp_network_transaction.cc
+++ b/net/ftp/ftp_network_transaction.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -654,7 +654,7 @@ int FtpNetworkTransaction::DoCtrlConnectComplete(int result) {
AddressList address;
result = ctrl_socket_->GetPeerAddress(&address);
if (result == OK) {
- response_.socket_address = HostPortPair::FromAddrInfo(address.head());
+ response_.socket_address = HostPortPair::FromIPEndPoint(address.front());
next_state_ = STATE_CTRL_READ;
}
}
@@ -1194,7 +1194,8 @@ int FtpNetworkTransaction::DoDataConnect() {
int rv = ctrl_socket_->GetPeerAddress(&data_address);
if (rv != OK)
return Stop(rv);
- data_address.SetPort(data_connection_port_);
+ data_address = AddressList::CreateFromIPAddress(
+ data_address.front().address(), data_connection_port_);
data_socket_.reset(socket_factory_->CreateTransportClientSocket(
data_address, net_log_.net_log(), net_log_.source()));
return data_socket_->Connect(io_callback_);
« no previous file with comments | « net/dns/dns_transaction_unittest.cc ('k') | net/ftp/ftp_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698