diff --git a/brightray/browser/url_request_context_getter.cc b/brightray/browser/url_request_context_getter.cc index 2797447d7222..5f161f912b72 100644 --- a/brightray/browser/url_request_context_getter.cc +++ b/brightray/browser/url_request_context_getter.cc @@ -298,9 +298,11 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { storage_->set_cert_transparency_verifier(std::move(ct_verifier)); storage_->set_ct_policy_enforcer(base::MakeUnique()); - net::HttpNetworkSession::Params network_session_params; + net::HttpNetworkSession::Context network_session_context; net::URLRequestContextBuilder::SetHttpNetworkSessionComponents( - url_request_context_.get(), &network_session_params); + url_request_context_.get(), &network_session_context); + + net::HttpNetworkSession::Params network_session_params; network_session_params.ignore_certificate_errors = false; // --disable-http2 @@ -316,16 +318,16 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { host_mapping_rules_.reset(new net::HostMappingRules); host_mapping_rules_->SetRulesFromString( command_line.GetSwitchValueASCII(switches::kHostRules)); - network_session_params.host_mapping_rules = host_mapping_rules_.get(); + network_session_params.host_mapping_rules = *host_mapping_rules_.get(); } // Give |storage_| ownership at the end in case it's |mapped_host_resolver|. storage_->set_host_resolver(std::move(host_resolver)); - network_session_params.host_resolver = + network_session_context.host_resolver = url_request_context_->host_resolver(); - http_network_session_.reset( - new net::HttpNetworkSession(network_session_params)); + http_network_session_.reset(new net::HttpNetworkSession( + network_session_params, network_session_context)); std::unique_ptr backend; if (in_memory_) { backend = net::HttpCache::DefaultBackend::InMemory(0);