| 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 d757e8686f10d6d3127d5bb419bf14486ddb60a6..970eb4e32dd295cfe3c40f51c5a2ffe28a0ef1b2 100644
|
| --- a/chrome/browser/profiles/profile_impl_io_data.cc
|
| +++ b/chrome/browser/profiles/profile_impl_io_data.cc
|
| @@ -33,6 +33,7 @@
|
| #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/http_protocol_handler.h"
|
| #include "net/url_request/url_request_job_factory.h"
|
| #include "webkit/quota/special_storage_policy.h"
|
|
|
| @@ -455,14 +456,56 @@ void ProfileImplIOData::LazyInitializeInternal(
|
| job_factories[1] = media_request_job_factory_.get();
|
| job_factories[2] = extensions_job_factory_.get();
|
|
|
| - net::FtpAuthCache* ftp_auth_caches[3];
|
| - ftp_auth_caches[0] = main_context->ftp_auth_cache();
|
| - ftp_auth_caches[1] = media_request_context_->ftp_auth_cache();
|
| - ftp_auth_caches[2] = extensions_context->ftp_auth_cache();
|
| + bool set_protocol = main_job_factory_->SetProtocolHandler(
|
| + chrome::kHttpScheme,
|
| + new net::HttpProtocolHandler(main_cache,
|
| + network_delegate(),
|
| + io_thread_globals->throttler_manager.get(),
|
| + main_context->accept_language(),
|
| + main_context->accept_charset(),
|
| + cookie_store,
|
| + fraudulent_certificate_reporter(),
|
| + main_context->ssl_config_service(),
|
| + transport_security_state()));
|
| + DCHECK(set_protocol);
|
| + set_protocol = media_request_job_factory_->SetProtocolHandler(
|
| + chrome::kHttpScheme,
|
| + new net::HttpProtocolHandler(media_cache,
|
| + network_delegate(),
|
| + io_thread_globals->throttler_manager.get(),
|
| + main_context->accept_language(),
|
| + main_context->accept_charset(),
|
| + cookie_store,
|
| + fraudulent_certificate_reporter(),
|
| + main_context->ssl_config_service(),
|
| + transport_security_state()));
|
| + DCHECK(set_protocol);
|
| + set_protocol = extensions_job_factory_->SetProtocolHandler(
|
| + chrome::kHttpScheme,
|
| + new net::HttpProtocolHandler(extensions_context->
|
| + http_transaction_factory(),
|
| + NULL,
|
| + io_thread_globals->throttler_manager.get(),
|
| + main_context->accept_language(),
|
| + main_context->accept_charset(),
|
| + extensions_cookie_store,
|
| + NULL,
|
| + main_context->ssl_config_service(),
|
| + transport_security_state()));
|
| + DCHECK(set_protocol);
|
| +
|
| + CreateFtpProtocolHandler(job_factories[0],
|
| + main_context->ftp_auth_cache(),
|
| + network_delegate());
|
| + CreateFtpProtocolHandler(job_factories[1],
|
| + media_request_context_->ftp_auth_cache(),
|
| + network_delegate());
|
| + CreateFtpProtocolHandler(job_factories[2],
|
| + extensions_context->ftp_auth_cache(),
|
| + NULL);
|
|
|
| for (int i = 0; i < 3; i++) {
|
| SetUpJobFactoryDefaults(job_factories[i]);
|
| - CreateFtpProtocolHandler(job_factories[i], ftp_auth_caches[i]);
|
| job_factories[i]->AddInterceptor(
|
| new chrome_browser_net::ConnectInterceptor(predictor_.get()));
|
| }
|
| @@ -572,12 +615,14 @@ chrome_browser_net::CacheStats* ProfileImplIOData::GetCacheStats(
|
|
|
| void ProfileImplIOData::CreateFtpProtocolHandler(
|
| net::URLRequestJobFactory* job_factory,
|
| - net::FtpAuthCache* ftp_auth_cache) const {
|
| - job_factory->SetProtocolHandler(
|
| + net::FtpAuthCache* ftp_auth_cache,
|
| + net::NetworkDelegate* network_delegate) const {
|
| + bool set_protocol = job_factory->SetProtocolHandler(
|
| chrome::kFtpScheme,
|
| - new net::FtpProtocolHandler(network_delegate(),
|
| + new net::FtpProtocolHandler(network_delegate,
|
| ftp_factory_.get(),
|
| ftp_auth_cache));
|
| + DCHECK(set_protocol);
|
| }
|
|
|
| void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread(
|
|
|