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

Unified Diff: trunk/src/net/url_request/url_request_context_builder.cc

Issue 12605011: Revert 188912 "Removed static factories for data, ftp, file, and..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 9 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: trunk/src/net/url_request/url_request_context_builder.cc
===================================================================
--- trunk/src/net/url_request/url_request_context_builder.cc (revision 188924)
+++ trunk/src/net/url_request/url_request_context_builder.cc (working copy)
@@ -26,13 +26,9 @@
#include "net/http/transport_security_state.h"
#include "net/proxy/proxy_service.h"
#include "net/ssl/ssl_config_service_defaults.h"
-#include "net/url_request/data_protocol_handler.h"
-#include "net/url_request/file_protocol_handler.h"
-#include "net/url_request/ftp_protocol_handler.h"
#include "net/url_request/static_http_user_agent_settings.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_storage.h"
-#include "net/url_request/url_request_job_factory_impl.h"
namespace net {
@@ -184,11 +180,7 @@
{}
URLRequestContextBuilder::URLRequestContextBuilder()
- : data_enabled_(false),
- file_enabled_(false),
-#if !defined(DISABLE_FTP_SUPPORT)
- ftp_enabled_(false),
-#endif
+ : ftp_enabled_(false),
http_cache_enabled_(true) {}
URLRequestContextBuilder::~URLRequestContextBuilder() {}
@@ -213,6 +205,11 @@
storage->set_host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
+ if (ftp_enabled_) {
+ storage->set_ftp_transaction_factory(
+ new FtpNetworkLayer(context->host_resolver()));
+ }
+
context->StartFileThread();
// TODO(willchan): Switch to using this code when
@@ -293,21 +290,6 @@
}
storage->set_http_transaction_factory(http_transaction_factory);
- URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl;
- if (data_enabled_)
- job_factory->SetProtocolHandler("data", new DataProtocolHandler);
- if (file_enabled_)
- job_factory->SetProtocolHandler("file", new FileProtocolHandler);
-#if !defined(DISABLE_FTP_SUPPORT)
- if (ftp_enabled_) {
- ftp_transaction_factory_.reset(
- new FtpNetworkLayer(context->host_resolver()));
- job_factory->SetProtocolHandler("ftp",
- new FtpProtocolHandler(ftp_transaction_factory_.get()));
- }
-#endif
- storage->set_job_factory(job_factory);
-
// TODO(willchan): Support sdch.
return context;
« no previous file with comments | « trunk/src/net/url_request/url_request_context_builder.h ('k') | trunk/src/net/url_request/url_request_context_storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698