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

Unified Diff: net/url_request/ftp_protocol_handler.cc

Issue 10537056: Replaced static URLRequestFtpJob factory with non-static protocol handler for FTP jobs. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed ftp_auth_cache 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/ftp_protocol_handler.h ('k') | net/url_request/url_request_ftp_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/ftp_protocol_handler.cc
diff --git a/net/url_request/ftp_protocol_handler.cc b/net/url_request/ftp_protocol_handler.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ae14e9d4be6dcd1b12d9c22db32ca2fe417c7430
--- /dev/null
+++ b/net/url_request/ftp_protocol_handler.cc
@@ -0,0 +1,30 @@
+// 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.
+
+#include "base/logging.h"
+#include "net/url_request/ftp_protocol_handler.h"
mmenke 2012/06/29 20:49:59 This should go first, with a blank line below it.
shalev 2012/07/03 19:41:46 Done.
+#include "net/url_request/url_request_ftp_job.h"
+
+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_auth_cache_(ftp_auth_cache) {
+ DCHECK(ftp_transaction_factory_);
+ DCHECK(ftp_auth_cache_);
+}
+
+URLRequestJob* FtpProtocolHandler::MaybeCreateJob(
+ URLRequest* request) const {
+ return new URLRequestFtpJob(request,
+ network_delegate_,
+ ftp_transaction_factory_,
+ ftp_auth_cache_);
+}
+
+} // namespace net
« no previous file with comments | « net/url_request/ftp_protocol_handler.h ('k') | net/url_request/url_request_ftp_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698