From e13c14645c5e2777d15c586483d7f29255f260fa Mon Sep 17 00:00:00 2001 From: "kbr@chromium.org" Date: Tue, 19 Mar 2013 03:05:50 +0000 Subject: Revert 188912 "Removed static factories for data, ftp, file, and..." Broke layout tests userscripts/user-script-plugin-document.html and plugins/plugin-document-back-forward.html on all platforms. > Removed static factories for data, ftp, file, and about jobs. > Instead add corresponding ProtocolHandlers as needed. > Remove URLRequestContext members used by these static > factories. Bake FtpAuthCache into FtpProtocolHandler as it > was already unique per FtpProtocolHandler. > This is a revived version of http://crrev.com/10836206 > > BUG=142945 > > > Review URL: https://chromiumcodereview.appspot.com/11931024 TBR=pauljensen@chromium.org Review URL: https://codereview.chromium.org/12605011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188927 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/net/about_protocol_handler.cc | 4 ---- chrome/browser/net/about_protocol_handler.h | 1 - chrome/browser/net/connection_tester.cc | 5 +++++ 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'chrome/browser/net') diff --git a/chrome/browser/net/about_protocol_handler.cc b/chrome/browser/net/about_protocol_handler.cc index 13f0c3b..3c6afe1 100644 --- a/chrome/browser/net/about_protocol_handler.cc +++ b/chrome/browser/net/about_protocol_handler.cc @@ -16,8 +16,4 @@ net::URLRequestJob* AboutProtocolHandler::MaybeCreateJob( return new net::URLRequestAboutJob(request, network_delegate); } -bool AboutProtocolHandler::IsSafeRedirectTarget(const GURL& location) const { - return false; -} - } // namespace chrome_browser_net diff --git a/chrome/browser/net/about_protocol_handler.h b/chrome/browser/net/about_protocol_handler.h index 623b1b0..b156b82 100644 --- a/chrome/browser/net/about_protocol_handler.h +++ b/chrome/browser/net/about_protocol_handler.h @@ -18,7 +18,6 @@ class AboutProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler { virtual net::URLRequestJob* MaybeCreateJob( net::URLRequest* request, net::NetworkDelegate* network_delegate) const OVERRIDE; - virtual bool IsSafeRedirectTarget(const GURL& location) const OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(AboutProtocolHandler); diff --git a/chrome/browser/net/connection_tester.cc b/chrome/browser/net/connection_tester.cc index a52b212..34906a6 100644 --- a/chrome/browser/net/connection_tester.cc +++ b/chrome/browser/net/connection_tester.cc @@ -21,6 +21,7 @@ #include "net/base/net_errors.h" #include "net/base/net_util.h" #include "net/cookies/cookie_monster.h" +#include "net/ftp/ftp_network_layer.h" #include "net/http/http_auth_handler_factory.h" #include "net/http/http_cache.h" #include "net/http/http_network_session.h" @@ -108,6 +109,10 @@ class ExperimentURLRequestContext : public net::URLRequestContext { // The rest of the dependencies are standard, and don't depend on the // experiment being run. storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); +#if !defined(DISABLE_FTP_SUPPORT) + storage_.set_ftp_transaction_factory( + new net::FtpNetworkLayer(host_resolver())); +#endif storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); storage_.set_http_auth_handler_factory( net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); -- cgit v1.1