Chromium Code Reviews| Index: components/cronet/url_request_context_config.cc |
| diff --git a/components/cronet/url_request_context_config.cc b/components/cronet/url_request_context_config.cc |
| index 5cd24b8664120160a03325b4288a9fd4b1c68752..37db0ba98a4f196a5e7727e1545a75129ffc0373 100644 |
| --- a/components/cronet/url_request_context_config.cc |
| +++ b/components/cronet/url_request_context_config.cc |
| @@ -22,6 +22,12 @@ namespace { |
| // TODO(xunjieli): Refactor constants in io_thread.cc. |
| const char kQuicFieldTrialName[] = "QUIC"; |
| const char kQuicConnectionOptions[] = "connection_options"; |
| +const char kQuicStoreServerConfigsInProperties[] = |
| + "store_server_configs_in_properties"; |
| +const char kQuicDelayTcpRace[] = "delay_tcp_race"; |
| +const char kQuicMaxNumberOfLossyConnections[] = |
| + "max_number_of_lossy_connections"; |
| +const char kQuicPacketLossThreshold[] = "packet_loss_threshold"; |
| // Using a reference to scoped_ptr is unavoidable because of the semantics of |
| // RegisterCustomField. |
| @@ -41,6 +47,7 @@ void ParseAndSetExperimentalOptions( |
| if (experimental_options.empty()) |
| return; |
| + VLOG(1) << "Experimental Options:" << experimental_options; |
|
ramant (doing other things)
2015/11/18 21:22:08
nit: is this intentional? Should we do DVLOG(1)?
xunjieli
2015/11/18 21:52:55
Done.
|
| scoped_ptr<base::Value> options = |
| base::JSONReader::Read(experimental_options); |
| @@ -67,6 +74,32 @@ void ParseAndSetExperimentalOptions( |
| context_builder->set_quic_connection_options( |
| net::QuicUtils::ParseQuicConnectionOptions(quic_connection_options)); |
| } |
| + |
| + bool quic_store_server_configs_in_properties = false; |
| + if (quic_args->GetBoolean(kQuicStoreServerConfigsInProperties, |
| + &quic_store_server_configs_in_properties)) { |
| + context_builder->set_quic_store_server_configs_in_properties( |
| + quic_store_server_configs_in_properties); |
| + } |
| + |
| + bool quic_delay_tcp_race = false; |
| + if (quic_args->GetBoolean(kQuicDelayTcpRace, &quic_delay_tcp_race)) { |
| + context_builder->set_quic_delay_tcp_race(quic_delay_tcp_race); |
| + } |
| + |
| + int quic_max_number_of_lossy_connections = 0; |
| + if (quic_args->GetInteger(kQuicMaxNumberOfLossyConnections, |
| + &quic_max_number_of_lossy_connections)) { |
| + context_builder->set_quic_max_number_of_lossy_connections( |
| + quic_max_number_of_lossy_connections); |
| + } |
| + |
| + double quic_packet_loss_threshold = 0.0; |
| + if (quic_args->GetDouble(kQuicPacketLossThreshold, |
| + &quic_packet_loss_threshold)) { |
| + context_builder->set_quic_packet_loss_threshold( |
| + quic_packet_loss_threshold); |
| + } |
| } |
| } |