| Index: chrome/browser/io_thread.cc
|
| diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
|
| index 5f8941abc2e4a208bc27084a9db31f4a20f38c96..cb31f17e60f67e4e433c32c9373b3391804e26e7 100644
|
| --- a/chrome/browser/io_thread.cc
|
| +++ b/chrome/browser/io_thread.cc
|
| @@ -1211,6 +1211,10 @@ void IOThread::InitializeNetworkSessionParamsFromGlobals(
|
| ¶ms->quic_enable_non_blocking_io);
|
| globals.quic_disable_disk_cache.CopyToIfSet(
|
| ¶ms->quic_disable_disk_cache);
|
| + globals.quic_max_number_of_lossy_connections.CopyToIfSet(
|
| + ¶ms->quic_max_number_of_lossy_connections);
|
| + globals.quic_packet_loss_threshold.CopyToIfSet(
|
| + ¶ms->quic_packet_loss_threshold);
|
| globals.quic_socket_receive_buffer_size.CopyToIfSet(
|
| ¶ms->quic_socket_receive_buffer_size);
|
| globals.enable_quic_port_selection.CopyToIfSet(
|
| @@ -1347,6 +1351,15 @@ void IOThread::ConfigureQuicGlobals(
|
| ShouldQuicEnableNonBlockingIO(quic_trial_params));
|
| globals->quic_disable_disk_cache.set(
|
| ShouldQuicDisableDiskCache(quic_trial_params));
|
| + int max_number_of_lossy_connections = GetQuicMaxNumberOfLossyConnections(
|
| + quic_trial_params);
|
| + if (max_number_of_lossy_connections != 0) {
|
| + globals->quic_max_number_of_lossy_connections.set(
|
| + max_number_of_lossy_connections);
|
| + }
|
| + float packet_loss_threshold = GetQuicPacketLossThreshold(quic_trial_params);
|
| + if (packet_loss_threshold != 0)
|
| + globals->quic_packet_loss_threshold.set(packet_loss_threshold);
|
| globals->enable_quic_port_selection.set(
|
| ShouldEnableQuicPortSelection(command_line));
|
| globals->quic_connection_options =
|
| @@ -1547,6 +1560,30 @@ bool IOThread::ShouldQuicDisableDiskCache(
|
| }
|
|
|
| // static
|
| +int IOThread::GetQuicMaxNumberOfLossyConnections(
|
| + const VariationParameters& quic_trial_params) {
|
| + int value;
|
| + if (base::StringToInt(GetVariationParam(quic_trial_params,
|
| + "max_number_of_lossy_connections"),
|
| + &value)) {
|
| + return value;
|
| + }
|
| + return 0;
|
| +}
|
| +
|
| +// static
|
| +float IOThread::GetQuicPacketLossThreshold(
|
| + const VariationParameters& quic_trial_params) {
|
| + double value;
|
| + if (base::StringToDouble(GetVariationParam(quic_trial_params,
|
| + "packet_loss_threshold"),
|
| + &value)) {
|
| + return (float)value;
|
| + }
|
| + return 0.0f;
|
| +}
|
| +
|
| +// static
|
| int IOThread::GetQuicSocketReceiveBufferSize(
|
| const VariationParameters& quic_trial_params) {
|
| int value;
|
|
|