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

Unified Diff: net/url_request/url_request_ftp_job.cc

Issue 11931024: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address erikwright's comments Created 7 years, 11 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
Index: net/url_request/url_request_ftp_job.cc
diff --git a/net/url_request/url_request_ftp_job.cc b/net/url_request/url_request_ftp_job.cc
index 27021a33687bdad7255e681678f5e25f98de4f63..d0962007d2ce605241ea1d30ea494e70172c292d 100644
--- a/net/url_request/url_request_ftp_job.cc
+++ b/net/url_request/url_request_ftp_job.cc
@@ -11,6 +11,7 @@
#include "net/base/host_port_pair.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
+#include "net/ftp/ftp_auth_cache.h"
#include "net/ftp/ftp_response_info.h"
#include "net/ftp/ftp_transaction_factory.h"
#include "net/url_request/url_request.h"
@@ -33,26 +34,6 @@ URLRequestFtpJob::URLRequestFtpJob(
DCHECK(ftp_auth_cache);
}
-// static
-URLRequestJob* URLRequestFtpJob::Factory(URLRequest* request,
- NetworkDelegate* network_delegate,
- const std::string& scheme) {
- DCHECK_EQ(scheme, "ftp");
-
- int port = request->url().IntPort();
- if (request->url().has_port() &&
- !IsPortAllowedByFtp(port) && !IsPortAllowedByOverride(port)) {
- return new URLRequestErrorJob(request,
- network_delegate,
- ERR_UNSAFE_PORT);
- }
-
- return new URLRequestFtpJob(request,
- network_delegate,
- request->context()->ftp_transaction_factory(),
- request->context()->ftp_auth_cache());
-}
-
bool URLRequestFtpJob::GetMimeType(std::string* mime_type) const {
if (transaction_->GetResponseInfo()->is_directory_listing) {
*mime_type = "text/vnd.chromium.ftp-dir";

Powered by Google App Engine
This is Rietveld 408576698