| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 globals.quic_idle_connection_timeout_seconds.CopyToIfSet( | 1138 globals.quic_idle_connection_timeout_seconds.CopyToIfSet( |
| 1139 ¶ms->quic_idle_connection_timeout_seconds); | 1139 ¶ms->quic_idle_connection_timeout_seconds); |
| 1140 globals.quic_disable_preconnect_if_0rtt.CopyToIfSet( | 1140 globals.quic_disable_preconnect_if_0rtt.CopyToIfSet( |
| 1141 ¶ms->quic_disable_preconnect_if_0rtt); | 1141 ¶ms->quic_disable_preconnect_if_0rtt); |
| 1142 if (!globals.quic_host_whitelist.empty()) | 1142 if (!globals.quic_host_whitelist.empty()) |
| 1143 params->quic_host_whitelist = globals.quic_host_whitelist; | 1143 params->quic_host_whitelist = globals.quic_host_whitelist; |
| 1144 globals.quic_migrate_sessions_on_network_change.CopyToIfSet( | 1144 globals.quic_migrate_sessions_on_network_change.CopyToIfSet( |
| 1145 ¶ms->quic_migrate_sessions_on_network_change); | 1145 ¶ms->quic_migrate_sessions_on_network_change); |
| 1146 globals.quic_migrate_sessions_early.CopyToIfSet( | 1146 globals.quic_migrate_sessions_early.CopyToIfSet( |
| 1147 ¶ms->quic_migrate_sessions_early); | 1147 ¶ms->quic_migrate_sessions_early); |
| 1148 globals.origin_to_force_quic_on.CopyToIfSet( | 1148 if (!globals.origins_to_force_quic_on.empty()) |
| 1149 ¶ms->origin_to_force_quic_on); | 1149 params->origins_to_force_quic_on = globals.origins_to_force_quic_on; |
| 1150 params->enable_user_alternate_protocol_ports = | 1150 params->enable_user_alternate_protocol_ports = |
| 1151 globals.enable_user_alternate_protocol_ports; | 1151 globals.enable_user_alternate_protocol_ports; |
| 1152 params->enable_token_binding = globals.enable_token_binding; | 1152 params->enable_token_binding = globals.enable_token_binding; |
| 1153 } | 1153 } |
| 1154 | 1154 |
| 1155 base::TimeTicks IOThread::creation_time() const { | 1155 base::TimeTicks IOThread::creation_time() const { |
| 1156 return creation_time_; | 1156 return creation_time_; |
| 1157 } | 1157 } |
| 1158 | 1158 |
| 1159 net::SSLConfigService* IOThread::GetSSLConfigService() { | 1159 net::SSLConfigService* IOThread::GetSSLConfigService() { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1317 globals->quic_user_agent_id.set(quic_user_agent_id); | 1317 globals->quic_user_agent_id.set(quic_user_agent_id); |
| 1318 | 1318 |
| 1319 net::QuicVersion version = GetQuicVersion(command_line, quic_trial_params); | 1319 net::QuicVersion version = GetQuicVersion(command_line, quic_trial_params); |
| 1320 if (version != net::QUIC_VERSION_UNSUPPORTED) { | 1320 if (version != net::QUIC_VERSION_UNSUPPORTED) { |
| 1321 net::QuicVersionVector supported_versions; | 1321 net::QuicVersionVector supported_versions; |
| 1322 supported_versions.push_back(version); | 1322 supported_versions.push_back(version); |
| 1323 globals->quic_supported_versions.set(supported_versions); | 1323 globals->quic_supported_versions.set(supported_versions); |
| 1324 } | 1324 } |
| 1325 | 1325 |
| 1326 if (command_line.HasSwitch(switches::kOriginToForceQuicOn)) { | 1326 if (command_line.HasSwitch(switches::kOriginToForceQuicOn)) { |
| 1327 net::HostPortPair quic_origin = | 1327 std::string origins = |
| 1328 net::HostPortPair::FromString( | 1328 command_line.GetSwitchValueASCII(switches::kOriginToForceQuicOn); |
| 1329 command_line.GetSwitchValueASCII(switches::kOriginToForceQuicOn)); | 1329 for (const std::string& host_port : base::SplitString( |
| 1330 if (!quic_origin.IsEmpty()) { | 1330 origins, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) { |
| 1331 globals->origin_to_force_quic_on.set(quic_origin); | 1331 net::HostPortPair quic_origin = net::HostPortPair::FromString(host_port); |
| 1332 if (!quic_origin.IsEmpty()) |
| 1333 globals->origins_to_force_quic_on.insert(quic_origin); |
| 1332 } | 1334 } |
| 1333 } | 1335 } |
| 1334 } | 1336 } |
| 1335 | 1337 |
| 1336 bool IOThread::ShouldDisableQuicWhenConnectionTimesOutWithOpenStreams( | 1338 bool IOThread::ShouldDisableQuicWhenConnectionTimesOutWithOpenStreams( |
| 1337 const VariationParameters& quic_trial_params) { | 1339 const VariationParameters& quic_trial_params) { |
| 1338 return base::LowerCaseEqualsASCII( | 1340 return base::LowerCaseEqualsASCII( |
| 1339 GetVariationParam(quic_trial_params, | 1341 GetVariationParam(quic_trial_params, |
| 1340 "disable_quic_on_timeout_with_open_streams"), | 1342 "disable_quic_on_timeout_with_open_streams"), |
| 1341 "true"); | 1343 "true"); |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1735 std::move(job_factory); | 1737 std::move(job_factory); |
| 1736 | 1738 |
| 1737 context->set_job_factory( | 1739 context->set_job_factory( |
| 1738 globals->proxy_script_fetcher_url_request_job_factory.get()); | 1740 globals->proxy_script_fetcher_url_request_job_factory.get()); |
| 1739 | 1741 |
| 1740 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1742 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
| 1741 // system URLRequestContext too. There's no reason this should be tied to a | 1743 // system URLRequestContext too. There's no reason this should be tied to a |
| 1742 // profile. | 1744 // profile. |
| 1743 return context; | 1745 return context; |
| 1744 } | 1746 } |
| OLD | NEW |