Reland "Roll src/net/third_party/quiche/src/ 7deaf37e9..c691071e9 (35 commits)"

This reverts commit https://chromium.googlesource.com/chromium/src/+/9f9dd5090001e41fb0a33f08cc5bb1779ed28148.

$ git log 7deaf37e9..c691071e9 --date=short --no-merges --format='%ad %ae %s'
2019-08-02 dschinazi Add missing QUIC_EXPORT_PRIVATE to test client ALPN
2019-08-02 fayang Fix tests to make chromium compile.
2019-08-02 fayang Fix a chromium compile error where local variable shadows member variable.
2019-08-01 dschinazi Support 20byte connection IDs in QUIC v99
2019-08-01 dschinazi Add connection ID length checks
2019-08-01 dschinazi Make QUIC enforce ALPN when using TLS handshake
2019-07-31 bnc Add helper methods to QpackSpdyStreamTest instead of hard-coding QPACK-encoded headers.
2019-07-31 fayang gfe-relnote: Close QUIC connection is there are too many (> 1000) buffered control frames in control frame manager. Protected by gfe2_reloadable_flag_quic_add_upper_limit_of_buffered_control_frames.
2019-07-31 renjietang Add version DCHECK for SPDY frames that are already replaced by HTTP/3 frames in v99.
2019-07-31 dschinazi Deprecate quic_do_not_override_connection_id
2019-07-31 dschinazi Fix a QUIC end_to_end test when some flags are enabled
2019-07-31 bnc Remove Http3FrameLengths.
2019-07-31 bnc Change HeaderBlocksForStream from QuicDeque to std::list.
2019-07-31 fayang gfe-relnote: Let GFE be able to use HTTP2(tree-style) priority write scheduler in QUIC and enable it via a connection option H2PR. Protected by gfe2_reloadable_flag_quic_use_http2_priority_write_scheduler.
2019-07-31 dschinazi Introduce IsConnectionIdLengthValidForVersion
2019-07-31 fayang gfe-relnote: Replace SpdyPriority priority with const spdy::SpdyStreamPrecedence& precedence in GfeQuicServerSession::CreateServerPushStream. No functional change expected. Not protected.
2019-07-31 fayang gfe-relnote: Add a FifoWriteScheduler where the stream with the smallest stream ID will have the highest priority. Not used in prod, not protected.
2019-07-31 fayang Add a const_cast to make chromium build.
2019-07-31 dschinazi Support LengthPrefixedConnectionIds in v99
2019-07-30 bnc Add QpackBlockingManager to track blocked streams and blocking entries.
2019-07-30 fayang Fix comparison of signed to unsigned in htt2_priority_write_scheduler_* and spdy_intrusive_list_test.
2019-07-30 renjietang Remove headers stream from IETF QUIC.
2019-07-30 bnc Refactor incoming SETTINGS logic to QuicSpdySession::OnSetting().
2019-07-30 fkastenholz Wire in the ack exponent trransport config for IETF QUIC
2019-07-29 quiche-dev Create a QuartcMultiplexer which separates streams and datagrams into channels.
2019-07-29 bnc Add QpackHeaderTable::MaxInsertSizeWithoutEvictingGivenEntry().
2019-07-29 renjietang Make OnPushPromiseFrameEnd() return the same value as OnHeadersFrameEnd().
2019-07-29 bnc Clean up HTTP/3 and QPACK settings.
2019-07-29 bnc Internal QUICHE change
2019-07-29 fkastenholz Connect up IETF QUIC Max ACK Delay transport parameter
2019-07-29 fayang gfe-relnote: Fix Http2PriorityWriteScheduler::UpdateStreamParent. Not used in prod. Not protected.
2019-07-27 bnc Update QuicSpdySessionTestClient.Http3ServerPush* tests.
2019-07-26 renjietang Write push promise on request streams.
2019-07-26 fayang gfe-relnote: In QUIC, let write_blocked_list be able to use HTTP2 priorities. Not used yet. Not Protected.
2019-07-26 fayang gfe-relnote: Fix Http2PriorityWriteScheduler::ShouldYield. Not used in prod. Not protected.

Created with:
  roll-dep src/net/third_party/quiche/src src/third_party/quic_trace/src

Please note quartc_multiplexer_test.cc is not added to BUILD.gn because it failed on Linux MSAN Tests:
https://luci-milo.appspot.com/p/chromium/builders/ci/Linux%20MSan%20Tests/18389

Change-Id: I35bbd7a1920f2d075f3cc638d2dd1e6570505e81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1736463
Commit-Queue: Fan Yang <[email protected]>
Reviewed-by: Ryan Hamilton <[email protected]>
Reviewed-by: Bence Béky <[email protected]>
Cr-Commit-Position: refs/heads/master@{#683984}
diff --git a/net/quic/quic_chromium_client_stream.cc b/net/quic/quic_chromium_client_stream.cc
index 97b6b66..5b2dbae 100644
--- a/net/quic/quic_chromium_client_stream.cc
+++ b/net/quic/quic_chromium_client_stream.cc
@@ -709,6 +709,10 @@
 }
 
 bool QuicChromiumClientStream::IsFirstStream() {
+  if (VersionUsesQpack(quic_version_)) {
+    return id() == quic::QuicUtils::GetFirstBidirectionalStreamId(
+                       quic_version_, quic::Perspective::IS_CLIENT);
+  }
   return id() == quic::QuicUtils::GetHeadersStreamId(quic_version_) +
                      quic::QuicUtils::StreamIdDelta(quic_version_);
 }