Chromium Code Reviews| Index: chrome/browser/profiles/profile_io_data.cc |
| diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc |
| index 8760ce944437e91a0749ffdf689e5c52e5994fd3..71ed48a231f94e0dd76c8aa21d62f7f04f0aa0de 100644 |
| --- a/chrome/browser/profiles/profile_io_data.cc |
| +++ b/chrome/browser/profiles/profile_io_data.cc |
| @@ -65,6 +65,7 @@ |
| #include "net/base/keygen_handler.h" |
| #include "net/cert/cert_verifier.h" |
| #include "net/cookies/canonical_cookie.h" |
| +#include "net/http/http_network_session.h" |
| #include "net/http/http_transaction_factory.h" |
| #include "net/http/http_util.h" |
| #include "net/http/transport_security_persister.h" |
| @@ -1288,13 +1289,13 @@ void ProfileIOData::DestroyResourceContext() { |
| resource_context_.reset(); |
| } |
| -scoped_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory( |
| - const ProfileParams* profile_params, |
| - net::HttpCache::BackendFactory* main_backend) const { |
| +// Creates the HTTP network session |
|
pauljensen
2015/09/11 13:05:25
Google C++ style guide says "you should not just r
mmenke
2015/09/11 14:46:49
Done. Accidentally copied from the header. Remov
|
| +scoped_ptr<net::HttpNetworkSession> ProfileIOData::CreateHttpNetworkSession( |
| + const ProfileParams& profile_params) const { |
| net::HttpNetworkSession::Params params; |
| net::URLRequestContext* context = main_request_context(); |
| - IOThread* const io_thread = profile_params->io_thread; |
| + IOThread* const io_thread = profile_params.io_thread; |
| io_thread->InitializeNetworkSessionParams(¶ms); |
| net::URLRequestContextBuilder::SetHttpNetworkSessionComponents(context, |
| @@ -1304,11 +1305,19 @@ scoped_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory( |
| if (data_reduction_proxy_io_data_.get()) |
| params.proxy_delegate = data_reduction_proxy_io_data_->proxy_delegate(); |
| - net::HttpNetworkSession* session = new net::HttpNetworkSession(params); |
| + return scoped_ptr<net::HttpNetworkSession>( |
| + new net::HttpNetworkSession(params)); |
| +} |
| + |
| +scoped_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory( |
| + net::HttpNetworkSession* session, |
| + net::HttpCache::BackendFactory* main_backend) const { |
| + net::URLRequestContext* context = main_request_context(); |
| return scoped_ptr<net::HttpCache>(new net::HttpCache( |
| new DevToolsNetworkTransactionFactory( |
| network_controller_handle_.GetController(), session), |
| - context->net_log(), main_backend)); |
| + context->net_log(), main_backend, |
| + true /* set_up_quic_server_info */)); |
| } |
| scoped_ptr<net::HttpCache> ProfileIOData::CreateHttpFactory( |
| @@ -1317,7 +1326,8 @@ scoped_ptr<net::HttpCache> ProfileIOData::CreateHttpFactory( |
| return scoped_ptr<net::HttpCache>(new net::HttpCache( |
| new DevToolsNetworkTransactionFactory( |
| network_controller_handle_.GetController(), shared_session), |
| - shared_session->net_log(), backend)); |
| + shared_session->net_log(), backend, |
| + true /* set_up_quic_server_info */)); |
| } |
| void ProfileIOData::SetCookieSettingsForTesting( |