| 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 5163819b39c3c4d6327bf7478ba01628ef51c59c..7f8e52c56a272ab68b40adec1cee91581477d7f0 100644
|
| --- a/chrome/browser/profiles/profile_impl_io_data.cc
|
| +++ b/chrome/browser/profiles/profile_impl_io_data.cc
|
| @@ -455,10 +455,8 @@ void ProfileImplIOData::InitializeInternal(
|
| lazy_params_->cache_max_size,
|
| BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)
|
| .get());
|
| - net::HttpNetworkSession::Params network_session_params;
|
| - PopulateNetworkSessionParams(profile_params, &network_session_params);
|
| - net::HttpCache* main_cache = new net::HttpCache(
|
| - network_session_params, main_backend);
|
| + scoped_ptr<net::HttpCache> main_cache = CreateMainHttpFactory(
|
| + profile_params, main_backend);
|
| main_cache->InitializeInfiniteCache(lazy_params_->infinite_cache_path);
|
|
|
| #if defined(OS_ANDROID) || defined(OS_IOS)
|
| @@ -472,8 +470,8 @@ void ProfileImplIOData::InitializeInternal(
|
| net::HttpCache::RECORD : net::HttpCache::PLAYBACK);
|
| }
|
|
|
| - main_http_factory_.reset(main_cache);
|
| - main_context->set_http_transaction_factory(main_cache);
|
| + main_http_factory_.reset(main_cache.release());
|
| + main_context->set_http_transaction_factory(main_http_factory_.get());
|
|
|
| #if !defined(DISABLE_FTP_SUPPORT)
|
| ftp_factory_.reset(
|
| @@ -588,8 +586,8 @@ ChromeURLRequestContext* ProfileImplIOData::InitializeAppRequestContext(
|
| }
|
| net::HttpNetworkSession* main_network_session =
|
| main_http_factory_->GetSession();
|
| - net::HttpCache* app_http_cache =
|
| - new net::HttpCache(main_network_session, app_backend);
|
| + scoped_ptr<net::HttpCache> app_http_cache =
|
| + CreateHttpFactory(main_network_session, app_backend);
|
|
|
| scoped_refptr<net::CookieStore> cookie_store = NULL;
|
| if (partition_descriptor.in_memory) {
|
| @@ -624,7 +622,8 @@ ChromeURLRequestContext* ProfileImplIOData::InitializeAppRequestContext(
|
| // Transfer ownership of the cookies and cache to AppRequestContext.
|
| context->SetCookieStore(cookie_store.get());
|
| context->SetHttpTransactionFactory(
|
| - scoped_ptr<net::HttpTransactionFactory>(app_http_cache));
|
| + scoped_ptr<net::HttpTransactionFactory>(
|
| + app_http_cache.PassAs<net::HttpTransactionFactory>()));
|
|
|
| scoped_ptr<net::URLRequestJobFactoryImpl> job_factory(
|
| new net::URLRequestJobFactoryImpl());
|
| @@ -677,11 +676,12 @@ ProfileImplIOData::InitializeMediaRequestContext(
|
| .get());
|
| net::HttpNetworkSession* main_network_session =
|
| main_http_factory_->GetSession();
|
| - scoped_ptr<net::HttpTransactionFactory> media_http_cache(
|
| - new net::HttpCache(main_network_session, media_backend));
|
| + scoped_ptr<net::HttpCache> media_http_cache =
|
| + CreateHttpFactory(main_network_session, media_backend);
|
|
|
| // Transfer ownership of the cache to MediaRequestContext.
|
| - context->SetHttpTransactionFactory(media_http_cache.Pass());
|
| + context->SetHttpTransactionFactory(
|
| + media_http_cache.PassAs<net::HttpTransactionFactory>());
|
|
|
| // Note that we do not create a new URLRequestJobFactory because
|
| // the media context should behave exactly like its parent context
|
|
|