| Index: content/shell/shell_url_request_context_getter.cc
|
| diff --git a/content/shell/shell_url_request_context_getter.cc b/content/shell/shell_url_request_context_getter.cc
|
| index c529daf9d4afd0a4d05ea6a8501059c76da01a4a..3f5f6bcecadaca369ef74d33345831500c066094 100644
|
| --- a/content/shell/shell_url_request_context_getter.cc
|
| +++ b/content/shell/shell_url_request_context_getter.cc
|
| @@ -19,7 +19,6 @@
|
| #include "net/cookies/cookie_monster.h"
|
| #include "net/dns/host_resolver.h"
|
| #include "net/dns/mapped_host_resolver.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"
|
| @@ -28,6 +27,8 @@
|
| #include "net/ssl/default_server_bound_cert_store.h"
|
| #include "net/ssl/server_bound_cert_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/protocol_intercept_job_factory.h"
|
| #include "net/url_request/static_http_user_agent_settings.h"
|
| #include "net/url_request/url_request_context.h"
|
| @@ -175,14 +176,19 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
|
| network_session_params, main_backend);
|
| storage_->set_http_transaction_factory(main_cache);
|
|
|
| -#if !defined(DISABLE_FTP_SUPPORT)
|
| - storage_->set_ftp_transaction_factory(
|
| - new net::FtpNetworkLayer(network_session_params.host_resolver));
|
| -#endif
|
| -
|
| scoped_ptr<net::URLRequestJobFactoryImpl> job_factory(
|
| new net::URLRequestJobFactoryImpl());
|
| + // Keep ProtocolHandlers added in sync with
|
| + // ShellContentBrowserClient::IsHandledURL().
|
| InstallProtocolHandlers(job_factory.get(), &protocol_handlers_);
|
| + bool set_protocol = job_factory->SetProtocolHandler(
|
| + chrome::kDataScheme,
|
| + new net::DataProtocolHandler);
|
| + DCHECK(set_protocol);
|
| + set_protocol = job_factory->SetProtocolHandler(
|
| + chrome::kFileScheme,
|
| + new net::FileProtocolHandler);
|
| + DCHECK(set_protocol);
|
| storage_->set_job_factory(job_factory.release());
|
| }
|
|
|
|
|