| 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 65ee20fd951857fde1efbcddaf5ba6ecf41af0c8..d1cc50e62fad3822aada2606377a54bc1de10db3 100644
|
| --- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
|
| +++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
|
| @@ -217,13 +217,12 @@ void OffTheRecordProfileIOData::LazyInitializeInternal(
|
| scoped_ptr<net::URLRequestJobFactoryImpl> main_job_factory(
|
| new net::URLRequestJobFactoryImpl());
|
|
|
| - SetUpJobFactoryDefaults(
|
| - main_job_factory.get(),
|
| + main_job_factory_ = SetUpJobFactoryDefaults(
|
| + main_job_factory.Pass(),
|
| 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_context->set_job_factory(main_job_factory_.get());
|
|
|
| #if defined(ENABLE_EXTENSIONS)
|
| @@ -270,13 +269,12 @@ void OffTheRecordProfileIOData::
|
| // job_factory::IsHandledProtocol return true, which prevents attempts to
|
| // handle the protocol externally. We pass NULL in to
|
| // SetUpJobFactoryDefaults() to get this effect.
|
| - SetUpJobFactoryDefaults(
|
| - extensions_job_factory.get(),
|
| + extensions_job_factory_ = SetUpJobFactoryDefaults(
|
| + extensions_job_factory.Pass(),
|
| 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_context->set_job_factory(extensions_job_factory_.get());
|
| }
|
|
|
| @@ -306,14 +304,15 @@ OffTheRecordProfileIOData::InitializeAppRequestContext(
|
|
|
| context->SetHttpTransactionFactory(app_http_cache.Pass());
|
|
|
| - scoped_ptr<net::URLRequestJobFactoryImpl> job_factory(
|
| + scoped_ptr<net::URLRequestJobFactoryImpl> base_job_factory(
|
| new net::URLRequestJobFactoryImpl());
|
| - SetUpJobFactoryDefaults(job_factory.get(),
|
| - protocol_handler_interceptor.Pass(),
|
| - network_delegate(),
|
| - context->ftp_transaction_factory(),
|
| - context->ftp_auth_cache());
|
| - context->SetJobFactory(job_factory.PassAs<net::URLRequestJobFactory>());
|
| + scoped_ptr<net::URLRequestJobFactory> top_job_factory =
|
| + SetUpJobFactoryDefaults(base_job_factory.Pass(),
|
| + protocol_handler_interceptor.Pass(),
|
| + network_delegate(),
|
| + context->ftp_transaction_factory(),
|
| + context->ftp_auth_cache());
|
| + context->SetJobFactory(top_job_factory.Pass());
|
| return context;
|
| }
|
|
|
|
|