Land Recent QUIC Changes.

Change the pre-handshake idle timeout to 5s from 120s, and the default
idle timeout is 30s.

This ensures clients don't wait more than 5s if the connection has UDP
blackholed.

Merge internal change: 76444120
https://codereview.chromium.org/610073002/

Add a convenience method to check for client supplied options in
QuicSentPacketManager.

Merge internal change: 76423808
https://codereview.chromium.org/607803004/

Add a QUIC tag to connection options to allow negotiating 1 connection
emulation in congestion control algorithms.

Merge internal change: 76351810
https://codereview.chromium.org/606503004/

Allow the number of connections QUIC's send algorithms simulate to
change, either initially or throughout the connection.

Merge internal change: 76297032
https://codereview.chromium.org/610053002/

Remove support for QUIC_VERSION_16.

Merge internal change: 76286812
https://codereview.chromium.org/601663004/

QUIC server max streams is now at least 10 streams larger than
configured limit. Protected by existing
FLAGS_quic_allow_more_open_streams.

Merge internal change: 76269911
https://codereview.chromium.org/607763007/

No functional change.  Rename QuicConfig methods from lowercase with
underscores to CamelCase, since they're not direct field accessors.

Merge internal change: 76185470
https://codereview.chromium.org/608453007/

Add a test to ensure QUIC's TcpCubicSender always allows packets to be
sent when there is less than a packet in flight.

Merge internal change: 76165601
https://codereview.chromium.org/608003002/

Merge QuicSentPacketManager::DebugDelegate's OnSentPacket,
OnRetransmittedPacket, and OnSerializedPacket into one OnSentPacket.

Merge internal change: 76088200
https://codereview.chromium.org/607983002/

Remove OnPacketRetransmitted from QuicConnectionDebugVisitor.

Merge internal change: 76084748
https://codereview.chromium.org/605263003/

[email protected]

Review URL: https://codereview.chromium.org/605163004

Cr-Commit-Position: refs/heads/master@{#297225}
diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h
index bcd58a2..9d73db1 100644
--- a/net/quic/quic_protocol.h
+++ b/net/quic/quic_protocol.h
@@ -108,12 +108,14 @@
 // Maximum delayed ack time, in ms.
 const int kMaxDelayedAckTimeMs = 25;
 
-// The default idle timeout before the crypto handshake succeeds.
-const int64 kDefaultInitialTimeoutSecs = 120;  // 2 mins.
+// The timeout before the handshake succeeds.
+const int64 kInitialIdleTimeoutSecs = 5;
+// The default idle timeout.
+const int64 kDefaultIdleTimeoutSecs = 30;
 // The maximum idle timeout that can be negotiated.
 const int64 kMaximumIdleTimeoutSecs = 60 * 10;  // 10 minutes.
 // The default timeout for a connection until the crypto handshake succeeds.
-const int64 kDefaultMaxTimeForCryptoHandshakeSecs = 10;  // 10 secs.
+const int64 kMaxTimeForCryptoHandshakeSecs = 10;  // 10 secs.
 
 // Default ping timeout.
 const int64 kPingTimeoutSecs = 15;  // 15 secs.
@@ -124,9 +126,14 @@
 // Minimum time between Server Config Updates (SCUP) sent to client.
 const int kMinIntervalBetweenServerConfigUpdatesMs = 1000;
 
-// Multiplier that allows server to accept slightly more streams than
-// negotiated in handshake.
+// The number of open streams that a server will accept is set to be slightly
+// larger than the negotiated limit. Immediately closing the connection if the
+// client opens slightly too many streams is not ideal: the client may have sent
+// a FIN that was lost, and simultaneously opened a new stream. The number of
+// streams a server accepts is a fixed increment over the negotiated limit, or a
+// percentage increase, whichever is larger.
 const float kMaxStreamsMultiplier = 1.1f;
+const int kMaxStreamsMinimumIncrement = 10;
 
 // We define an unsigned 16-bit floating point value, inspired by IEEE floats
 // (http://en.wikipedia.org/wiki/Half_precision_floating-point_format),
@@ -287,7 +294,6 @@
   // Special case to indicate unknown/unsupported QUIC version.
   QUIC_VERSION_UNSUPPORTED = 0,
 
-  QUIC_VERSION_16 = 16,  // STOP_WAITING frame.
   QUIC_VERSION_18 = 18,  // PING frame.
   QUIC_VERSION_19 = 19,  // Connection level flow control.
   QUIC_VERSION_21 = 21,  // Headers/crypto streams are flow controlled.
@@ -306,8 +312,7 @@
                                                      QUIC_VERSION_22,
                                                      QUIC_VERSION_21,
                                                      QUIC_VERSION_19,
-                                                     QUIC_VERSION_18,
-                                                     QUIC_VERSION_16};
+                                                     QUIC_VERSION_18};
 
 typedef std::vector<QuicVersion> QuicVersionVector;