| 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 9f21ccaa021f2be72c89534cb80039d1ff1e185c..a7444482e265a363da3201da92550c82b8a91696 100644 | 
| --- a/chrome/browser/profiles/profile_impl_io_data.cc | 
| +++ b/chrome/browser/profiles/profile_impl_io_data.cc | 
| @@ -417,12 +417,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) | 
| @@ -476,12 +476,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()); | 
| } | 
|  | 
| @@ -557,15 +558,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; | 
| } | 
| @@ -654,19 +659,20 @@ 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())); | 
| +  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( | 
|  |