Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1832)

Unified Diff: chrome/browser/io_thread.cc

Issue 2907463002: Split HttpNetworkSession::Params into two structs. (Closed)
Patch Set: Response to comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/profiles/off_the_record_profile_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index f863d07acacf53f5f9a0c35139b26b80512d4a6d..a730d142064ab6be67c3112667264af7945a6655 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -618,10 +618,11 @@ void IOThread::Init() {
command_line.GetSwitchValueASCII(switches::kHostRules));
TRACE_EVENT_END0("startup", "IOThread::InitAsync:SetRulesFromString");
}
- params_.host_mapping_rules = *globals_->host_mapping_rules.get();
+
+ session_params_.host_mapping_rules = *globals_->host_mapping_rules.get();
globals_->enable_brotli =
base::FeatureList::IsEnabled(features::kBrotliEncoding);
- params_.enable_token_binding =
+ session_params_.enable_token_binding =
base::FeatureList::IsEnabled(features::kTokenBinding);
// Check for OS support of TCP FastOpen, and turn it on for all connections if
@@ -635,7 +636,7 @@ void IOThread::Init() {
ConfigureParamsFromFieldTrialsAndCommandLine(
command_line, is_quic_allowed_by_policy_,
- http_09_on_non_default_ports_enabled_, &params_);
+ http_09_on_non_default_ports_enabled_, &session_params_);
#if defined(OS_MACOSX)
// Start observing Keychain events. This needs to be done on the UI thread,
@@ -777,11 +778,11 @@ void IOThread::ClearHostCache(
}
const net::HttpNetworkSession::Params& IOThread::NetworkSessionParams() const {
- return params_;
+ return session_params_;
}
void IOThread::DisableQuic() {
- params_.enable_quic = false;
+ session_params_.enable_quic = false;
if (globals_->system_request_context_storage)
globals_->system_request_context_storage->http_network_session()
@@ -877,6 +878,7 @@ void IOThread::ConstructSystemRequestContext() {
context->set_cert_verifier(globals_->cert_verifier.get());
context->set_cert_transparency_verifier(
globals_->cert_transparency_verifier.get());
+
context_storage->set_ct_policy_enforcer(
base::MakeUnique<net::CTPolicyEnforcer>());
@@ -887,12 +889,13 @@ void IOThread::ConstructSystemRequestContext() {
std::move(system_proxy_config_service_), command_line,
WpadQuickCheckEnabled(), PacHttpsUrlStrippingEnabled()));
- net::HttpNetworkSession::Params system_params(params_);
+ net::HttpNetworkSession::Context session_context;
net::URLRequestContextBuilder::SetHttpNetworkSessionComponents(
- context, &system_params);
+ context, &session_context);
context_storage->set_http_network_session(
- base::MakeUnique<net::HttpNetworkSession>(system_params));
+ base::MakeUnique<net::HttpNetworkSession>(session_params_,
+ session_context));
context_storage->set_http_transaction_factory(
base::MakeUnique<net::HttpNetworkLayer>(
context_storage->http_network_session()));
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/profiles/off_the_record_profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698