Roll src/net/third_party/quiche/src/ d96ecdaaf..051660f24 (22 commits)

https://quiche.googlesource.com/quiche.git/+log/d96ecdaaf35e..051660f24473
$ git log d96ecdaaf..051660f24 --date=short --no-merges --format='%ad %ae %s'
2020-02-06 wub gfe-relnote: Add a quic::test::ServerThread::WaitUntil method and use it in quic end_to_end_test. Test only.
2020-02-06 bnc Do not call HpackWholeEntryBuffer::error_detected() in HpackDecoder::error_detected().
2020-02-06 nharper Fix connection close check in quic_client_interop_test_bin
2020-02-06 vasilvv Fix ODR violations in quic_versions.h
2020-02-05 ianswett gfe-relnote: No longer send a RESET_STREAM in response to a STOP_SENDING if the stream is write closed.  Protected by disabled gfe2_reloadable_flag_quic_enable_version_99.
2020-02-05 dschinazi Deprecate quic_allow_very_long_connection_ids
2020-02-05 fayang gfe-relnote: Initialize stream_count in default constructor of QuicMaxStreamsFrame. Protected by disabled v99 flag.
2020-02-05 wub gfe-relnote: (n/a) In QuicClientBase, mark version negotiated when the client reconnects. Test only.
2020-02-05 nharper Fix timeouts and rebinding check in quic_client_interop_test
2020-02-05 dschinazi Add TLS to QuicIetfTransportErrorCodeString
2020-02-04 renjietang Insert a greased frame after a HTTP/3 SETTINGS frame is sent.
2020-02-04 bnc Make bool methods with unused return values void.
2020-02-04 fayang gfe-relnote: In QUIC, notify frame acked when discarding initial key. Protected by gfe2_reloadable_flag_quic_neuter_unencrypted_control_frames.
2020-02-04 wub gfe-relnote: (n/a) Increase the time in some quic http end_to_end_tests to reduce flakiness. Test only, not protected.
2020-02-04 bnc Remove IntervalItem from anonymous namespace.
2020-02-04 nharper Remove nullptr checks from quic_client_interop_test_bin.cc
2020-02-04 bnc Set max_outbound_header_list_size_ when receiving SETTINGS_MAX_HEADER_LIST_SIZE.
2020-02-04 dschinazi Adopt QuicConnectionDebugVisitor from quic_client_interop_test
2020-02-03 renjietang Clarify QuicSession::CloseStreamInner() parameters.
2020-02-03 renjietang Add debugging logs for static stream QUIC bug.
2020-02-03 fayang gfe-relnote: In QUIC, check connected_ when processing MaxStreamsFrame and StreamsBlockedFrame. Protected by disabled v99 flag.
2020-02-03 fayang gfe-relnote: Deprecate gfe2_reloadable_flag_quic_on_packet_numbers_skipped

Change-Id: I1079a1db479079df3e8f8fefcf0ac36485cff5e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2044758
Reviewed-by: Zhongyi Shi <[email protected]>
Commit-Queue: Zhongyi Shi <[email protected]>
Cr-Commit-Position: refs/heads/master@{#739648}
diff --git a/DEPS b/DEPS
index 1002f40..aa6570f 100644
--- a/DEPS
+++ b/DEPS
@@ -306,7 +306,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling feed
   # and whatever else without interference from each other.
-  'quiche_revision': 'd96ecdaaf35ed85147a67b73af46c1897c5646ee',
+  'quiche_revision': '051660f244735e560fb9637806bd50a4c9ff9bff',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling ios_webkit
   # and whatever else without interference from each other.
diff --git a/net/http2/platform/impl/http2_flags_impl.cc b/net/http2/platform/impl/http2_flags_impl.cc
index 21704559..cde8253 100644
--- a/net/http2/platform/impl/http2_flags_impl.cc
+++ b/net/http2/platform/impl/http2_flags_impl.cc
@@ -5,3 +5,5 @@
 #include "net/http2/platform/impl/http2_flags_impl.h"
 
 bool FLAGS_http2_varint_decode_64_bits = true;
+
+bool FLAGS_http2_skip_querying_entry_buffer_error = false;
diff --git a/net/http2/platform/impl/http2_flags_impl.h b/net/http2/platform/impl/http2_flags_impl.h
index 160a741..3d2f153 100644
--- a/net/http2/platform/impl/http2_flags_impl.h
+++ b/net/http2/platform/impl/http2_flags_impl.h
@@ -8,6 +8,7 @@
 #include "net/third_party/quiche/src/common/platform/api/quiche_export.h"
 
 QUICHE_EXPORT_PRIVATE extern bool FLAGS_http2_varint_decode_64_bits;
+QUICHE_EXPORT_PRIVATE extern bool FLAGS_http2_skip_querying_entry_buffer_error;
 
 namespace http2 {
 
diff --git a/net/quic/quic_chromium_client_session_test.cc b/net/quic/quic_chromium_client_session_test.cc
index 3baecd3..2f677c2 100644
--- a/net/quic/quic_chromium_client_session_test.cc
+++ b/net/quic/quic_chromium_client_session_test.cc
@@ -149,7 +149,7 @@
                       false),
         migrate_session_early_v2_(false),
         go_away_on_path_degrading_(false) {
-    FLAGS_quic_disable_http3_settings_grease_randomness = true;
+    FLAGS_quic_enable_http3_grease_randomness = false;
     quic::QuicEnableVersion(version_);
     // Advance the time, because timers do not like uninitialized times.
     clock_.AdvanceTime(quic::QuicTime::Delta::FromSeconds(1));
diff --git a/net/quic/quic_flags_list.h b/net/quic/quic_flags_list.h
index ba2d681..e2d341ad 100644
--- a/net/quic/quic_flags_list.h
+++ b/net/quic/quic_flags_list.h
@@ -397,7 +397,7 @@
     false)
 
 // If true, use predictable grease settings identifiers and values.
-QUIC_FLAG(bool, FLAGS_quic_disable_http3_settings_grease_randomness, false)
+QUIC_FLAG(bool, FLAGS_quic_enable_http3_grease_randomness, true)
 
 // If true, QuicConnection will check handshake timeout before idle timeout.
 QUIC_FLAG(
@@ -414,3 +414,9 @@
 // If true, QuicConnection will check MTU_DISCOVERY_FRAME in
 // nonretransmittable_frames to see if a packet is a MTU probe.
 QUIC_FLAG(bool, FLAGS_quic_reloadable_flag_quic_better_mtu_packet_check, false)
+
+// If true, neuter unencrypted control frames in
+// QuicUnackedPacketMap::NeuterUnencryptedPackets.
+QUIC_FLAG(bool,
+          FLAGS_quic_reloadable_flag_quic_neuter_unencrypted_control_frames,
+          false)
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc
index a01c3c2..c7ca37b 100644
--- a/net/quic/quic_http_stream_test.cc
+++ b/net/quic/quic_http_stream_test.cc
@@ -246,7 +246,7 @@
                       false),
         random_generator_(0),
         printer_(version_) {
-    FLAGS_quic_disable_http3_settings_grease_randomness = true;
+    FLAGS_quic_enable_http3_grease_randomness = false;
     quic::QuicEnableVersion(version_);
     IPAddress ip(192, 0, 2, 33);
     peer_addr_ = IPEndPoint(ip, 443);
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc
index 29987175..3430795 100644
--- a/net/quic/quic_network_transaction_unittest.cc
+++ b/net/quic/quic_network_transaction_unittest.cc
@@ -322,7 +322,7 @@
         auth_handler_factory_(HttpAuthHandlerFactory::CreateDefault()),
         http_server_properties_(std::make_unique<HttpServerProperties>()),
         ssl_data_(ASYNC, OK) {
-    FLAGS_quic_disable_http3_settings_grease_randomness = true;
+    FLAGS_quic_enable_http3_grease_randomness = false;
     request_.method = "GET";
     std::string url("https://");
     url.append(kDefaultServerHostName);
@@ -7440,7 +7440,7 @@
             ConfiguredProxyResolutionService::CreateDirect()),
         auth_handler_factory_(HttpAuthHandlerFactory::CreateDefault()),
         ssl_data_(ASYNC, OK) {
-    FLAGS_quic_disable_http3_settings_grease_randomness = true;
+    FLAGS_quic_enable_http3_grease_randomness = false;
   }
 
   void SetUp() override {
diff --git a/net/quic/quic_proxy_client_socket_unittest.cc b/net/quic/quic_proxy_client_socket_unittest.cc
index 5aa92c3..a221e7f 100644
--- a/net/quic/quic_proxy_client_socket_unittest.cc
+++ b/net/quic/quic_proxy_client_socket_unittest.cc
@@ -184,7 +184,7 @@
             false /* key_server_entries_by_network_isolation_key */),
         host_resolver_(new MockCachingHostResolver()),
         http_auth_handler_factory_(HttpAuthHandlerFactory::CreateDefault()) {
-    FLAGS_quic_disable_http3_settings_grease_randomness = true;
+    FLAGS_quic_enable_http3_grease_randomness = false;
     IPAddress ip(192, 0, 2, 33);
     peer_addr_ = IPEndPoint(ip, 443);
     clock_.AdvanceTime(quic::QuicTime::Delta::FromMilliseconds(20));
diff --git a/net/quic/quic_stream_factory_test.cc b/net/quic/quic_stream_factory_test.cc
index 09a6a604..031c79f 100644
--- a/net/quic/quic_stream_factory_test.cc
+++ b/net/quic/quic_stream_factory_test.cc
@@ -248,7 +248,7 @@
             base::Unretained(this))),
         failed_on_default_network_(false),
         quic_params_(context_.params()) {
-    FLAGS_quic_disable_http3_settings_grease_randomness = true;
+    FLAGS_quic_enable_http3_grease_randomness = false;
     quic_params_->headers_include_h2_stream_dependency =
         client_headers_include_h2_stream_dependency;
     context_.AdvanceTime(quic::QuicTime::Delta::FromSeconds(1));
diff --git a/net/quic/quic_test_packet_maker.cc b/net/quic/quic_test_packet_maker.cc
index c7ca5bc..4bdd3fb 100644
--- a/net/quic/quic_test_packet_maker.cc
+++ b/net/quic/quic_test_packet_maker.cc
@@ -1326,6 +1326,13 @@
   return std::string(buffer.get(), frame_length);
 }
 
+std::string QuicTestPacketMaker::GenerateHttp3GreaseData() {
+  std::unique_ptr<char[]> buffer;
+  quic::QuicByteCount frame_length =
+      quic::HttpEncoder::SerializeGreasingFrame(&buffer);
+  return std::string(buffer.get(), frame_length);
+}
+
 void QuicTestPacketMaker::MaybeAddHttp3SettingsFrames() {
   DCHECK(quic::VersionUsesHttp3(version_.transport_version));
 
@@ -1340,11 +1347,12 @@
   // stream first.
   std::string type(1, 0x00);
   std::string settings_data = GenerateHttp3SettingsData();
+  std::string grease_data = GenerateHttp3GreaseData();
   std::string max_push_id_data = GenerateHttp3MaxPushIdData();
 
   // The type and the SETTINGS frame may be sent in multiple QUIC STREAM
   // frames.
-  std::string data = type + settings_data + max_push_id_data;
+  std::string data = type + settings_data + grease_data + max_push_id_data;
 
   AddQuicStreamFrame(stream_id, false, data);
   AddQuicStreamFrame(stream_id + 4, false, "\x03");
diff --git a/net/quic/quic_test_packet_maker.h b/net/quic/quic_test_packet_maker.h
index 473d930..b3adc847 100644
--- a/net/quic/quic_test_packet_maker.h
+++ b/net/quic/quic_test_packet_maker.h
@@ -434,6 +434,7 @@
   std::string GenerateHttp3MaxPushIdData();
   std::string GenerateHttp3PriorityData(spdy::SpdyPriority priority,
                                         quic::QuicStreamId stream_id);
+  std::string GenerateHttp3GreaseData();
 
   void MaybeAddHttp3SettingsFrames();