diff options
author | droger@chromium.org <droger@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-30 13:18:11 +0000 |
---|---|---|
committer | droger@chromium.org <droger@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-30 13:18:11 +0000 |
commit | 9bfe0abdadacdea74ae09c94526671a7355f39b8 (patch) | |
tree | 34e720bb2a086a6361e9a79dd006ef680acb440b /net/url_request | |
parent | 2cd0d33bb3ef20aaa74b922050a3c55bda37b4ec (diff) | |
download | chromium_src-9bfe0abdadacdea74ae09c94526671a7355f39b8.zip chromium_src-9bfe0abdadacdea74ae09c94526671a7355f39b8.tar.gz chromium_src-9bfe0abdadacdea74ae09c94526671a7355f39b8.tar.bz2 |
Disable FTP on iOS
FTP is not supported on iOS.
This is not obvious, because net.gyp builds almost nothing on iOS currently, but we plan on keeping the ftp/ directory excluded from iOS builds.
BUG=145459
Review URL: https://chromiumcodereview.appspot.com/10880071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154130 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r-- | net/url_request/url_request_context.cc | 2 | ||||
-rw-r--r-- | net/url_request/url_request_context.h | 10 | ||||
-rw-r--r-- | net/url_request/url_request_job_manager.cc | 2 | ||||
-rw-r--r-- | net/url_request/url_request_test_util.cc | 4 |
4 files changed, 17 insertions, 1 deletions
diff --git a/net/url_request/url_request_context.cc b/net/url_request/url_request_context.cc index e0df04e..e4f7f31 100644 --- a/net/url_request/url_request_context.cc +++ b/net/url_request/url_request_context.cc @@ -27,7 +27,9 @@ URLRequestContext::URLRequestContext() network_delegate_(NULL), http_server_properties_(NULL), transport_security_state_(NULL), +#if !defined(DISABLE_FTP_SUPPORT) ftp_auth_cache_(new FtpAuthCache), +#endif http_transaction_factory_(NULL), ftp_transaction_factory_(NULL), job_factory_(NULL), diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h index 3863540..8e8e3cc 100644 --- a/net/url_request/url_request_context.h +++ b/net/url_request/url_request_context.h @@ -160,7 +160,13 @@ class NET_EXPORT URLRequestContext } // Gets the FTP authentication cache for this context. - FtpAuthCache* ftp_auth_cache() const { return ftp_auth_cache_.get(); } + FtpAuthCache* ftp_auth_cache() const { +#if !defined(DISABLE_FTP_SUPPORT) + return ftp_auth_cache_.get(); +#else + return NULL; +#endif + } // Gets the value of 'Accept-Charset' header field. const std::string& accept_charset() const { return accept_charset_; } @@ -227,7 +233,9 @@ class NET_EXPORT URLRequestContext HttpServerProperties* http_server_properties_; scoped_refptr<CookieStore> cookie_store_; TransportSecurityState* transport_security_state_; +#if !defined(DISABLE_FTP_SUPPORT) scoped_ptr<FtpAuthCache> ftp_auth_cache_; +#endif std::string accept_language_; std::string accept_charset_; // The charset of the referrer where this request comes from. It's not diff --git a/net/url_request/url_request_job_manager.cc b/net/url_request/url_request_job_manager.cc index 2a68088..14f9f5d 100644 --- a/net/url_request/url_request_job_manager.cc +++ b/net/url_request/url_request_job_manager.cc @@ -37,7 +37,9 @@ static const SchemeToFactory kBuiltinFactories[] = { { "http", URLRequestHttpJob::Factory }, { "https", URLRequestHttpJob::Factory }, { "file", URLRequestFileJob::Factory }, +#if !defined(DISABLE_FTP_SUPPORT) { "ftp", URLRequestFtpJob::Factory }, +#endif { "about", URLRequestAboutJob::Factory }, { "data", URLRequestDataJob::Factory }, }; diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc index 53574f7..5388b49 100644 --- a/net/url_request/url_request_test_util.cc +++ b/net/url_request/url_request_test_util.cc @@ -67,8 +67,12 @@ void TestURLRequestContext::Init() { if (!cert_verifier()) context_storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); if (!ftp_transaction_factory()) { +#if !defined(DISABLE_FTP_SUPPORT) context_storage_.set_ftp_transaction_factory( new net::FtpNetworkLayer(host_resolver())); +#else + context_storage_.set_ftp_transaction_factory(NULL); +#endif // !defined(DISABLE_FTP_SUPPORT) } if (!ssl_config_service()) context_storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); |