Chromium Code Reviews| Index: net/quic/core/quic_config.cc |
| diff --git a/net/quic/core/quic_config.cc b/net/quic/core/quic_config.cc |
| index 513b0145f2aa6797832dff8ed0d56050bb3864e0..e146678bde44e7009928a266d7acb787f7874019 100644 |
| --- a/net/quic/core/quic_config.cc |
| +++ b/net/quic/core/quic_config.cc |
| @@ -12,6 +12,7 @@ |
| #include "net/quic/core/quic_socket_address_coder.h" |
| #include "net/quic/core/quic_utils.h" |
| #include "net/quic/platform/api/quic_bug_tracker.h" |
| +#include "net/quic/platform/api/quic_flag_utils.h" |
| #include "net/quic/platform/api/quic_logging.h" |
| #include "net/quic/platform/api/quic_string_piece.h" |
| @@ -340,7 +341,9 @@ QuicConfig::QuicConfig() |
| connection_migration_disabled_(kNCMR, PRESENCE_OPTIONAL), |
| alternate_server_address_(kASAD, PRESENCE_OPTIONAL), |
| force_hol_blocking_(kFHL2, PRESENCE_OPTIONAL), |
| - support_max_header_list_size_(kSMHL, PRESENCE_OPTIONAL) { |
| + support_max_header_list_size_(kSMHL, PRESENCE_OPTIONAL), |
| + latched_no_socket_receive_buffer_( |
| + FLAGS_quic_reloadable_flag_quic_no_socket_receive_buffer) { |
| SetDefaults(); |
| } |
| @@ -542,7 +545,11 @@ uint32_t QuicConfig::ReceivedInitialSessionFlowControlWindowBytes() const { |
| } |
| void QuicConfig::SetSocketReceiveBufferToSend(uint32_t tcp_receive_window) { |
| - socket_receive_buffer_.SetSendValue(tcp_receive_window); |
| + if (latched_no_socket_receive_buffer_) { |
| + QUIC_FLAG_COUNT_N(gfe2_reloadable_flag_quic_no_socket_receive_buffer, 1, 3); |
|
Ryan Hamilton
2017/03/10 05:37:44
ditto. I'm perplexed by why the script missed this
|
| + } else { |
| + socket_receive_buffer_.SetSendValue(tcp_receive_window); |
| + } |
| } |
| bool QuicConfig::HasReceivedSocketReceiveBuffer() const { |
| @@ -631,7 +638,11 @@ void QuicConfig::ToHandshakeMessage(CryptoHandshakeMessage* out) const { |
| initial_round_trip_time_us_.ToHandshakeMessage(out); |
| initial_stream_flow_control_window_bytes_.ToHandshakeMessage(out); |
| initial_session_flow_control_window_bytes_.ToHandshakeMessage(out); |
| - socket_receive_buffer_.ToHandshakeMessage(out); |
| + if (latched_no_socket_receive_buffer_) { |
| + QUIC_FLAG_COUNT_N(gfe2_reloadable_flag_quic_no_socket_receive_buffer, 2, 3); |
| + } else { |
| + socket_receive_buffer_.ToHandshakeMessage(out); |
| + } |
| connection_migration_disabled_.ToHandshakeMessage(out); |
| connection_options_.ToHandshakeMessage(out); |
| alternate_server_address_.ToHandshakeMessage(out); |
| @@ -678,7 +689,9 @@ QuicErrorCode QuicConfig::ProcessPeerHello( |
| error = initial_session_flow_control_window_bytes_.ProcessPeerHello( |
| peer_hello, hello_type, error_details); |
| } |
| - if (error == QUIC_NO_ERROR) { |
| + if (latched_no_socket_receive_buffer_) { |
| + QUIC_FLAG_COUNT_N(gfe2_reloadable_flag_quic_no_socket_receive_buffer, 3, 3); |
| + } else if (error == QUIC_NO_ERROR) { |
| error = socket_receive_buffer_.ProcessPeerHello(peer_hello, hello_type, |
| error_details); |
| } |