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

Side by Side Diff: net/ftp/ftp_network_transaction.cc

Issue 2214693002: First step to remove SingleRequestHostResolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: single Created 4 years, 4 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
« no previous file with comments | « net/ftp/ftp_network_transaction.h ('k') | net/http/http_auth_handler_negotiate.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/ftp/ftp_network_transaction.h" 5 #include "net/ftp/ftp_network_transaction.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 } 630 }
631 } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE); 631 } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE);
632 return rv; 632 return rv;
633 } 633 }
634 634
635 int FtpNetworkTransaction::DoCtrlResolveHost() { 635 int FtpNetworkTransaction::DoCtrlResolveHost() {
636 next_state_ = STATE_CTRL_RESOLVE_HOST_COMPLETE; 636 next_state_ = STATE_CTRL_RESOLVE_HOST_COMPLETE;
637 637
638 HostResolver::RequestInfo info(HostPortPair::FromURL(request_->url)); 638 HostResolver::RequestInfo info(HostPortPair::FromURL(request_->url));
639 // No known referrer. 639 // No known referrer.
640 return resolver_.Resolve( 640 return resolver_->Resolve(
641 info, 641 info, DEFAULT_PRIORITY, &addresses_,
642 DEFAULT_PRIORITY,
643 &addresses_,
644 base::Bind(&FtpNetworkTransaction::OnIOComplete, base::Unretained(this)), 642 base::Bind(&FtpNetworkTransaction::OnIOComplete, base::Unretained(this)),
645 net_log_); 643 &resolve_request_, net_log_);
646 } 644 }
647 645
648 int FtpNetworkTransaction::DoCtrlResolveHostComplete(int result) { 646 int FtpNetworkTransaction::DoCtrlResolveHostComplete(int result) {
649 if (result == OK) 647 if (result == OK)
650 next_state_ = STATE_CTRL_CONNECT; 648 next_state_ = STATE_CTRL_CONNECT;
651 return result; 649 return result;
652 } 650 }
653 651
654 int FtpNetworkTransaction::DoCtrlConnect() { 652 int FtpNetworkTransaction::DoCtrlConnect() {
655 next_state_ = STATE_CTRL_CONNECT_COMPLETE; 653 next_state_ = STATE_CTRL_CONNECT_COMPLETE;
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 if (!had_error_type[type]) { 1370 if (!had_error_type[type]) {
1373 had_error_type[type] = true; 1371 had_error_type[type] = true;
1374 UMA_HISTOGRAM_ENUMERATION("Net.FtpDataConnectionErrorHappened", 1372 UMA_HISTOGRAM_ENUMERATION("Net.FtpDataConnectionErrorHappened",
1375 type, NUM_OF_NET_ERROR_TYPES); 1373 type, NUM_OF_NET_ERROR_TYPES);
1376 } 1374 }
1377 UMA_HISTOGRAM_ENUMERATION("Net.FtpDataConnectionErrorCount", 1375 UMA_HISTOGRAM_ENUMERATION("Net.FtpDataConnectionErrorCount",
1378 type, NUM_OF_NET_ERROR_TYPES); 1376 type, NUM_OF_NET_ERROR_TYPES);
1379 } 1377 }
1380 1378
1381 } // namespace net 1379 } // namespace net
OLDNEW
« no previous file with comments | « net/ftp/ftp_network_transaction.h ('k') | net/http/http_auth_handler_negotiate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698