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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 1613513003: Early connection migration in QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Typo fixed. Created 4 years, 10 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 unified diff | Download patch
OLDNEW
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 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 globals.quic_close_sessions_on_ip_change.CopyToIfSet( 1217 globals.quic_close_sessions_on_ip_change.CopyToIfSet(
1218 &params->quic_close_sessions_on_ip_change); 1218 &params->quic_close_sessions_on_ip_change);
1219 globals.quic_idle_connection_timeout_seconds.CopyToIfSet( 1219 globals.quic_idle_connection_timeout_seconds.CopyToIfSet(
1220 &params->quic_idle_connection_timeout_seconds); 1220 &params->quic_idle_connection_timeout_seconds);
1221 globals.quic_disable_preconnect_if_0rtt.CopyToIfSet( 1221 globals.quic_disable_preconnect_if_0rtt.CopyToIfSet(
1222 &params->quic_disable_preconnect_if_0rtt); 1222 &params->quic_disable_preconnect_if_0rtt);
1223 if (!globals.quic_host_whitelist.empty()) 1223 if (!globals.quic_host_whitelist.empty())
1224 params->quic_host_whitelist = globals.quic_host_whitelist; 1224 params->quic_host_whitelist = globals.quic_host_whitelist;
1225 globals.quic_migrate_sessions_on_network_change.CopyToIfSet( 1225 globals.quic_migrate_sessions_on_network_change.CopyToIfSet(
1226 &params->quic_migrate_sessions_on_network_change); 1226 &params->quic_migrate_sessions_on_network_change);
1227 globals.quic_migrate_sessions_early.CopyToIfSet(
1228 &params->quic_migrate_sessions_early);
1227 globals.origin_to_force_quic_on.CopyToIfSet( 1229 globals.origin_to_force_quic_on.CopyToIfSet(
1228 &params->origin_to_force_quic_on); 1230 &params->origin_to_force_quic_on);
1229 params->enable_user_alternate_protocol_ports = 1231 params->enable_user_alternate_protocol_ports =
1230 globals.enable_user_alternate_protocol_ports; 1232 globals.enable_user_alternate_protocol_ports;
1231 params->enable_token_binding = globals.enable_token_binding; 1233 params->enable_token_binding = globals.enable_token_binding;
1232 } 1234 }
1233 1235
1234 base::TimeTicks IOThread::creation_time() const { 1236 base::TimeTicks IOThread::creation_time() const {
1235 return creation_time_; 1237 return creation_time_;
1236 } 1238 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 if (idle_connection_timeout_seconds != 0) { 1365 if (idle_connection_timeout_seconds != 0) {
1364 globals->quic_idle_connection_timeout_seconds.set( 1366 globals->quic_idle_connection_timeout_seconds.set(
1365 idle_connection_timeout_seconds); 1367 idle_connection_timeout_seconds);
1366 } 1368 }
1367 globals->quic_disable_preconnect_if_0rtt.set( 1369 globals->quic_disable_preconnect_if_0rtt.set(
1368 ShouldQuicDisablePreConnectIfZeroRtt(quic_trial_params)); 1370 ShouldQuicDisablePreConnectIfZeroRtt(quic_trial_params));
1369 globals->quic_host_whitelist = 1371 globals->quic_host_whitelist =
1370 GetQuicHostWhitelist(command_line, quic_trial_params); 1372 GetQuicHostWhitelist(command_line, quic_trial_params);
1371 globals->quic_migrate_sessions_on_network_change.set( 1373 globals->quic_migrate_sessions_on_network_change.set(
1372 ShouldQuicMigrateSessionsOnNetworkChange(quic_trial_params)); 1374 ShouldQuicMigrateSessionsOnNetworkChange(quic_trial_params));
1375 globals->quic_migrate_sessions_early.set(
1376 ShouldQuicMigrateSessionsEarly(quic_trial_params));
1373 } 1377 }
1374 1378
1375 size_t max_packet_length = GetQuicMaxPacketLength(command_line, 1379 size_t max_packet_length = GetQuicMaxPacketLength(command_line,
1376 quic_trial_params); 1380 quic_trial_params);
1377 if (max_packet_length != 0) { 1381 if (max_packet_length != 0) {
1378 globals->quic_max_packet_length.set(max_packet_length); 1382 globals->quic_max_packet_length.set(max_packet_length);
1379 } 1383 }
1380 1384
1381 std::string quic_user_agent_id = chrome::GetChannelString(); 1385 std::string quic_user_agent_id = chrome::GetChannelString();
1382 if (!quic_user_agent_id.empty()) 1386 if (!quic_user_agent_id.empty())
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 } 1666 }
1663 1667
1664 bool IOThread::ShouldQuicMigrateSessionsOnNetworkChange( 1668 bool IOThread::ShouldQuicMigrateSessionsOnNetworkChange(
1665 const VariationParameters& quic_trial_params) { 1669 const VariationParameters& quic_trial_params) {
1666 return base::LowerCaseEqualsASCII( 1670 return base::LowerCaseEqualsASCII(
1667 GetVariationParam(quic_trial_params, 1671 GetVariationParam(quic_trial_params,
1668 "migrate_sessions_on_network_change"), 1672 "migrate_sessions_on_network_change"),
1669 "true"); 1673 "true");
1670 } 1674 }
1671 1675
1676 bool IOThread::ShouldQuicMigrateSessionsEarly(
1677 const VariationParameters& quic_trial_params) {
1678 return base::LowerCaseEqualsASCII(
1679 GetVariationParam(quic_trial_params, "migrate_sessions_early"), "true");
1680 }
1681
1672 size_t IOThread::GetQuicMaxPacketLength( 1682 size_t IOThread::GetQuicMaxPacketLength(
1673 const base::CommandLine& command_line, 1683 const base::CommandLine& command_line,
1674 const VariationParameters& quic_trial_params) { 1684 const VariationParameters& quic_trial_params) {
1675 if (command_line.HasSwitch(switches::kQuicMaxPacketLength)) { 1685 if (command_line.HasSwitch(switches::kQuicMaxPacketLength)) {
1676 unsigned value; 1686 unsigned value;
1677 if (!base::StringToUint( 1687 if (!base::StringToUint(
1678 command_line.GetSwitchValueASCII(switches::kQuicMaxPacketLength), 1688 command_line.GetSwitchValueASCII(switches::kQuicMaxPacketLength),
1679 &value)) { 1689 &value)) {
1680 return 0; 1690 return 0;
1681 } 1691 }
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1841 std::move(job_factory); 1851 std::move(job_factory);
1842 1852
1843 context->set_job_factory( 1853 context->set_job_factory(
1844 globals->proxy_script_fetcher_url_request_job_factory.get()); 1854 globals->proxy_script_fetcher_url_request_job_factory.get());
1845 1855
1846 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the 1856 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the
1847 // system URLRequestContext too. There's no reason this should be tied to a 1857 // system URLRequestContext too. There's no reason this should be tied to a
1848 // profile. 1858 // profile.
1849 return context; 1859 return context;
1850 } 1860 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698