| 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 4e78d076afb9c259c341b49730ac0d1f53cd95ce..2e4458b691c407a318e6ff84302539cfeb2ee1cb 100644
|
| --- a/chrome/browser/profiles/profile_impl_io_data.cc
|
| +++ b/chrome/browser/profiles/profile_impl_io_data.cc
|
| @@ -418,12 +418,12 @@ void ProfileImplIOData::LazyInitializeInternal(
|
|
|
| scoped_ptr<net::URLRequestJobFactoryImpl> main_job_factory(
|
| new net::URLRequestJobFactoryImpl());
|
| - SetUpJobFactory(main_job_factory.get(),
|
| - profile_params->protocol_handler_interceptor.Pass(),
|
| - network_delegate(),
|
| - main_context->ftp_transaction_factory(),
|
| - main_context->ftp_auth_cache());
|
| - main_job_factory_ = main_job_factory.Pass();
|
| + main_job_factory_ = SetUpJobFactory(
|
| + main_job_factory.Pass(),
|
| + profile_params->protocol_handler_interceptor.Pass(),
|
| + network_delegate(),
|
| + main_context->ftp_transaction_factory(),
|
| + main_context->ftp_auth_cache());
|
| main_context->set_job_factory(main_job_factory_.get());
|
|
|
| #if defined(ENABLE_EXTENSIONS)
|
| @@ -477,12 +477,13 @@ void ProfileImplIOData::
|
| // job_factory::IsHandledProtocol return true, which prevents attempts to
|
| // handle the protocol externally. We pass NULL in to
|
| // SetUpJobFactory() to get this effect.
|
| - SetUpJobFactory(extensions_job_factory.get(),
|
| - scoped_ptr<net::URLRequestJobFactoryImpl::Interceptor>(NULL),
|
| - NULL,
|
| - extensions_context->ftp_transaction_factory(),
|
| - extensions_context->ftp_auth_cache());
|
| - extensions_job_factory_ = extensions_job_factory.Pass();
|
| + extensions_job_factory_ = SetUpJobFactory(
|
| + extensions_job_factory.Pass(),
|
| + scoped_ptr<net::URLRequestJobFactoryImpl::Interceptor>(NULL),
|
| + NULL,
|
| + extensions_context->ftp_transaction_factory(),
|
| + extensions_context->ftp_auth_cache());
|
| +
|
| extensions_context->set_job_factory(extensions_job_factory_.get());
|
| }
|
|
|
| @@ -558,15 +559,19 @@ ProfileImplIOData::InitializeAppRequestContext(
|
| // that we can later provide our own handles for storage related protocols.
|
| // Install all the usual protocol handlers unless we are in a browser plugin
|
| // guest process, in which case only web-safe schemes are allowed.
|
| - scoped_ptr<net::URLRequestJobFactoryImpl> job_factory(
|
| + scoped_ptr<net::URLRequestJobFactoryImpl> base_job_factory(
|
| new net::URLRequestJobFactoryImpl());
|
| + scoped_ptr<net::URLRequestJobFactory> top_job_factory;
|
| if (!partition_descriptor.in_memory) {
|
| - SetUpJobFactory(job_factory.get(), protocol_handler_interceptor.Pass(),
|
| - network_delegate(),
|
| - context->ftp_transaction_factory(),
|
| - context->ftp_auth_cache());
|
| + top_job_factory = SetUpJobFactory(base_job_factory.Pass(),
|
| + protocol_handler_interceptor.Pass(),
|
| + network_delegate(),
|
| + context->ftp_transaction_factory(),
|
| + context->ftp_auth_cache());
|
| + } else {
|
| + top_job_factory = base_job_factory.PassAs<net::URLRequestJobFactory>();
|
| }
|
| - context->SetJobFactory(job_factory.PassAs<net::URLRequestJobFactory>());
|
| + context->SetJobFactory(top_job_factory.Pass());
|
|
|
| return context;
|
| }
|
| @@ -655,21 +660,22 @@ chrome_browser_net::LoadTimeStats* ProfileImplIOData::GetLoadTimeStats(
|
| return io_thread_globals->load_time_stats.get();
|
| }
|
|
|
| -void ProfileImplIOData::SetUpJobFactory(
|
| - net::URLRequestJobFactoryImpl* job_factory,
|
| +scoped_ptr<net::URLRequestJobFactory> ProfileImplIOData::SetUpJobFactory(
|
| + scoped_ptr<net::URLRequestJobFactoryImpl> job_factory,
|
| scoped_ptr<net::URLRequestJobFactory::Interceptor>
|
| protocol_handler_interceptor,
|
| net::NetworkDelegate* network_delegate,
|
| net::FtpTransactionFactory* ftp_transaction_factory,
|
| net::FtpAuthCache* ftp_auth_cache) const {
|
| - SetUpJobFactoryDefaults(job_factory, protocol_handler_interceptor.Pass(),
|
| - network_delegate, ftp_transaction_factory,
|
| - ftp_auth_cache);
|
| -
|
| - job_factory->AddInterceptor(
|
| - new chrome_browser_net::ConnectInterceptor(predictor_.get()));
|
| job_factory->AddInterceptor(
|
| new DoubleGetExperimentInterceptor(NULL));
|
| + scoped_ptr<net::URLRequestJobFactory> top_job_factory =
|
| + SetUpJobFactoryDefaults(job_factory.Pass(),
|
| + protocol_handler_interceptor.Pass(),
|
| + network_delegate, ftp_transaction_factory,
|
| + ftp_auth_cache);
|
| + return chrome_browser_net::ConnectInterceptor::CreateURLRequestJobFactory(
|
| + top_job_factory.Pass(), predictor_.get());
|
| }
|
|
|
| void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread(
|
|
|