Index: chrome/browser/profiles/profile_impl_io_data.cc |
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc |
index 454f0b04212b1373120191fc5af6cdc2fbb4abf4..4c1126f1da750b4e356e1f291d25f3fcf7e72e2a 100644 |
--- a/chrome/browser/profiles/profile_impl_io_data.cc |
+++ b/chrome/browser/profiles/profile_impl_io_data.cc |
@@ -30,6 +30,7 @@ |
#include "net/base/server_bound_cert_service.h" |
#include "net/ftp/ftp_network_layer.h" |
#include "net/http/http_cache.h" |
+#include "net/url_request/ftp_protocol_handler.h" |
#include "net/url_request/url_request_job_factory.h" |
#include "webkit/quota/special_storage_policy.h" |
@@ -443,6 +444,8 @@ void ProfileImplIOData::LazyInitializeInternal( |
main_context->set_ftp_transaction_factory(ftp_factory_.get()); |
media_request_context_->set_ftp_transaction_factory(ftp_factory_.get()); |
+ ftp_auth_cache_.reset(new net::FtpAuthCache); |
+ |
main_context->set_chrome_url_data_manager_backend( |
chrome_url_data_manager_backend()); |
@@ -450,6 +453,10 @@ void ProfileImplIOData::LazyInitializeInternal( |
media_request_context_->set_job_factory(job_factory()); |
extensions_context->set_job_factory(job_factory()); |
+ job_factory()->SetProtocolHandler(chrome::kFtpScheme, |
+ new net::FtpProtocolHandler( |
+ network_delegate(), ftp_factory_.get(), ftp_auth_cache_.get())); |
+ |
job_factory()->AddInterceptor( |
new chrome_browser_net::ConnectInterceptor(predictor_.get())); |