summaryrefslogtreecommitdiffstats
path: root/net/url_request/ftp_protocol_handler.cc
diff options
context:
space:
mode:
authorshalev@chromium.org <shalev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-24 01:06:58 +0000
committershalev@chromium.org <shalev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-24 01:06:58 +0000
commit9f170464e1ab4f1f75802a391db76408bc8998f2 (patch)
tree50ecf1c9c893ab12c59ee653d57732572128b7ed /net/url_request/ftp_protocol_handler.cc
parent3dc4019ef862889073cf16e875050a512e93aa3a (diff)
downloadchromium_src-9f170464e1ab4f1f75802a391db76408bc8998f2.zip
chromium_src-9f170464e1ab4f1f75802a391db76408bc8998f2.tar.gz
chromium_src-9f170464e1ab4f1f75802a391db76408bc8998f2.tar.bz2
Refactoring: ProtocolHandler::MaybeCreateJob and other functions take NetworkDelegate as argument
This change goes a long way to prepare for removing NetworkDelegate from URLRequestContext. TBR=sky@chromium.org, michaeln@chromium.org, benjhayden@chromium.org, brettw@chromium.org, ben@chromium.org, davemoore@chromium.org, zelidrag@chromium.org, mnissler@chromium.org, thestig@chromium.org, asargent@chromium.org, jhawkins@chromium.org, bulach@chromium.org BUG=crbug.com/142945 Review URL: https://chromiumcodereview.appspot.com/10855209 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153133 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/ftp_protocol_handler.cc')
-rw-r--r--net/url_request/ftp_protocol_handler.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/url_request/ftp_protocol_handler.cc b/net/url_request/ftp_protocol_handler.cc
index b9dc0fa0..7d9ba88 100644
--- a/net/url_request/ftp_protocol_handler.cc
+++ b/net/url_request/ftp_protocol_handler.cc
@@ -15,26 +15,24 @@
namespace net {
FtpProtocolHandler::FtpProtocolHandler(
- NetworkDelegate* network_delegate,
FtpTransactionFactory* ftp_transaction_factory,
FtpAuthCache* ftp_auth_cache)
- : network_delegate_(network_delegate),
- ftp_transaction_factory_(ftp_transaction_factory),
+ : ftp_transaction_factory_(ftp_transaction_factory),
ftp_auth_cache_(ftp_auth_cache) {
DCHECK(ftp_transaction_factory_);
DCHECK(ftp_auth_cache_);
}
URLRequestJob* FtpProtocolHandler::MaybeCreateJob(
- URLRequest* request) const {
+ URLRequest* request, NetworkDelegate* network_delegate) const {
int port = request->url().IntPort();
if (request->url().has_port() &&
!IsPortAllowedByFtp(port) && !IsPortAllowedByOverride(port)) {
- return new URLRequestErrorJob(request, ERR_UNSAFE_PORT);
+ return new URLRequestErrorJob(request, network_delegate, ERR_UNSAFE_PORT);
}
return new URLRequestFtpJob(request,
- network_delegate_,
+ network_delegate,
ftp_transaction_factory_,
ftp_auth_cache_);
}