Revert of QUIC - enable "delay_tcp_race" parameter by default. This feature showed (patchset #3 id:60001 of https://codereview.chromium.org/1916783003/ )
Reason for revert:
Reverting this CL so that we could experiment delay_tcp_race.
Original issue's description:
> QUIC - enable "delay_tcp_race" parameter by default. This feature showed
> positive results in stable channel and it will be enabled by default
> via finch trial in Stable and Beta (M50 and M51).
>
> [email protected],[email protected]
>
> Committed: https://crrev.com/634050c3f304a48f62c6ceb022a7f83945ea1968
> Cr-Commit-Position: refs/heads/master@{#390468}
[email protected],[email protected]
Review-Url: https://codereview.chromium.org/1977303002
Cr-Commit-Position: refs/heads/master@{#393778}
diff --git a/net/quic/quic_stream_factory_test.cc b/net/quic/quic_stream_factory_test.cc
index a3e6473..e8f1017 100644
--- a/net/quic/quic_stream_factory_test.cc
+++ b/net/quic/quic_stream_factory_test.cc
@@ -294,6 +294,7 @@
threshold_timeouts_with_open_streams_(2),
threshold_public_resets_post_handshake_(2),
receive_buffer_size_(0),
+ delay_tcp_race_(false),
close_sessions_on_ip_change_(false),
disable_quic_on_timeout_with_open_streams_(false),
idle_connection_timeout_seconds_(kIdleConnectionTimeoutSeconds),
@@ -325,7 +326,7 @@
prefer_aes_, max_number_of_lossy_connections_, packet_loss_threshold_,
max_disabled_reasons_, threshold_timeouts_with_open_streams_,
threshold_public_resets_post_handshake_, receive_buffer_size_,
- /*max_server_configs_stored_in_properties*/ 0,
+ delay_tcp_race_, /*max_server_configs_stored_in_properties*/ 0,
close_sessions_on_ip_change_,
disable_quic_on_timeout_with_open_streams_,
idle_connection_timeout_seconds_, migrate_sessions_on_network_change_,
@@ -514,6 +515,7 @@
int threshold_timeouts_with_open_streams_;
int threshold_public_resets_post_handshake_;
int receive_buffer_size_;
+ bool delay_tcp_race_;
bool close_sessions_on_ip_change_;
bool disable_quic_on_timeout_with_open_streams_;
int idle_connection_timeout_seconds_;
@@ -3650,6 +3652,8 @@
Initialize();
ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails();
crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
+ bool delay_tcp_race = QuicStreamFactoryPeer::GetDelayTcpRace(factory_.get());
+ QuicStreamFactoryPeer::SetDelayTcpRace(factory_.get(), false);
MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
SequencedSocketData socket_data(reads, arraysize(reads), nullptr, 0);
socket_factory_.AddSocketDataProvider(&socket_data);
@@ -3672,6 +3676,14 @@
/*cert_verify_flags=*/0, url_, "POST", net_log_,
callback_.callback()));
+ // If we don't delay TCP connection, then time delay should be 0.
+ EXPECT_FALSE(factory_->delay_tcp_race());
+ EXPECT_EQ(base::TimeDelta(), request.GetTimeDelayForWaitingJob());
+
+ // Enable |delay_tcp_race_| param and verify delay is one RTT and that
+ // server supports QUIC.
+ QuicStreamFactoryPeer::SetDelayTcpRace(factory_.get(), true);
+ EXPECT_TRUE(factory_->delay_tcp_race());
EXPECT_EQ(base::TimeDelta::FromMicroseconds(15),
request.GetTimeDelayForWaitingJob());
@@ -3685,6 +3697,7 @@
EXPECT_TRUE(stream.get());
EXPECT_TRUE(socket_data.AllReadDataConsumed());
EXPECT_TRUE(socket_data.AllWriteDataConsumed());
+ QuicStreamFactoryPeer::SetDelayTcpRace(factory_.get(), delay_tcp_race);
}
TEST_P(QuicStreamFactoryTest, MaybeInitialize) {