Chromium Code Reviews| Index: chrome/browser/profiles/off_the_record_profile_io_data.cc |
| diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc |
| index 830d6df17e42294fb8ae4fb32561180725cc1835..0e44180db5fba7dd0d9ca19805037d55f21e15fb 100644 |
| --- a/chrome/browser/profiles/off_the_record_profile_io_data.cc |
| +++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc |
| @@ -28,6 +28,7 @@ |
| #include "net/http/http_cache.h" |
| #include "net/http/http_server_properties_impl.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/database/database_tracker.h" |
| @@ -255,13 +256,38 @@ void OffTheRecordProfileIOData::LazyInitializeInternal( |
| job_factories[0] = main_job_factory_.get(); |
| job_factories[1] = extensions_job_factory_.get(); |
| - net::FtpAuthCache* ftp_auth_caches[2]; |
| - ftp_auth_caches[0] = main_context->ftp_auth_cache(); |
| - ftp_auth_caches[1] = extensions_context->ftp_auth_cache(); |
| + bool set_protocol = main_job_factory_->SetProtocolHandler( |
| + chrome::kHttpScheme, |
| + new net::HttpProtocolHandler(cache, |
| + network_delegate(), |
| + io_thread_globals->throttler_manager.get(), |
| + main_context->accept_language(), |
| + main_context->accept_charset(), |
| + main_context->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(NULL, |
| + NULL, |
|
mmenke
2012/07/18 16:21:53
Same comment about this being NULL as in the other
shalev
2012/07/23 21:00:21
I responded to this comment in the other cl: I am
|
| + 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], extensions_context->ftp_auth_cache(), NULL); |
| for (int i = 0; i < 2; i++) { |
| SetUpJobFactoryDefaults(job_factories[i]); |
| - CreateFtpProtocolHandler(job_factories[i], ftp_auth_caches[i]); |
| } |
| main_context->set_job_factory(main_job_factory_.get()); |
| @@ -313,10 +339,11 @@ OffTheRecordProfileIOData::AcquireIsolatedAppRequestContext( |
| void OffTheRecordProfileIOData::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(), ftp_factory_.get(), ftp_auth_cache)); |
| + network_delegate, ftp_factory_.get(), ftp_auth_cache)); |
| + DCHECK(set_protocol); |
| } |
| - |