Land recent QUIC changes.

Count the number of retransmissions for a packet due to RTO and explicit nacks and implement exponential backoff based on number of retransmissions.

Merge internal change: 41823946

QuicConnection now packetizes acks and congestion control frames even more lazily and packs control frames with up to 1 stream frame.

Merge internal change: 41805161

Remove nitty-gritties of QuicFramer from QuicTimeWaitListManager and remove some static methods from QuicFramer.

Merge internal change: 41795314

Store socket addresses in QuicConnection.h instead of pushing it down to QuicFramer.h and getting it back from there.

Merge internal change: 41768211

Retransmit largest_observed_ packet if its missing.

Merge internal change: 41743584

Split framer packet creation into size determination and packet creation methods in order to ensure the maximum number of frames are fit into a single packet.

Merge internal change: 41702016

Handle packet reordering for queued packets.

Merge internal change: 41701179

Bug fix for retransmission order.

Merge internal change: 41638847

Adding basic dispatcher stats for QUIC

Merge internal change: 41630921

Minor fixes in quic_connection.cc

Merge internal change: 41610652

Use priority queue to maintain the list of sequence numbers to be retransmitted. This will enable us to do an exponential backoff for lost packets.

Merge internal change: 41582526

Adding DISALLOW_COPY_AND_ASSIGN to all congestion control classes that were missing it. And a few nits.

Merge internal change: 41580553

Break circular dependency between quic_protocol.h and quic_bandwidth.h

Merge internal change: 41578776

Fix uninitialized memory access in quic_framer_test.

Merge internal change: 41558816

Cleanup, consolidated quic_send_scheduler with quic_congestion_manager

Merge internal change: 41549823

Set the retransmit alarm only when we successfully write the packet to the socket instead of setting it when we attempt to write.

Merge internal change: 41547192

Introduced QuicByteCount and moved TCP receive_bytes packing to QuicFramer where it belongs.

Merge internal change: 41546840

Fix a bug with how FEC groups were being created in QUIC.  Now opening multiple and always closing the group.

Merge internal change: 41538221

Removing QUIC logspam

Merge internal change: 41537896

Exposing ReadPublicHeader and ReadPublicResetPacket static methods which don't take a dependency on reader_(unlike Process..() methods).

Merge internal change: 41535886

Use "test" not "testing" for test namespaces to be consistent with other QUIC code.

Merge internal change: 41534488

Fix a number of minor issues that came up in landing recent chrome changes.

Merge internal change: 41531793

Removed the QuicReceiptMetricsCollector and started using the ReceiveAlgorithmInterface directly in the CongestionManager. The QuicReceiptMetricsCollector did not provide any functionality.

Merge internal change: 41486246

Integrating new quic bandwidth class

Merge internal change: 41473682

[email protected]
BUG=


Review URL: https://chromiumcodereview.appspot.com/12145002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180299 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h
index 9d641ee..a88d8845 100644
--- a/net/quic/quic_protocol.h
+++ b/net/quic/quic_protocol.h
@@ -20,6 +20,7 @@
 #include "base/string_piece.h"
 #include "net/base/int128.h"
 #include "net/base/net_export.h"
+#include "net/quic/quic_bandwidth.h"
 #include "net/quic/quic_time.h"
 
 namespace net {
@@ -36,7 +37,8 @@
 typedef uint64 QuicPublicResetNonceProof;
 
 // TODO(rch): Consider Quic specific names for these constants.
-const size_t kMaxPacketSize = 1200;  // Maximum size in bytes of a QUIC packet.
+// Maximum size in bytes of a QUIC packet.
+const QuicByteCount kMaxPacketSize = 1200;
 
 // Maximum number of open streams per connection.
 const size_t kDefaultMaxStreamsPerConnection = 100;
@@ -53,6 +55,8 @@
 const size_t kFecGroupSize = 1;
 // Number of bytes reserved for the nonce proof in public reset packet.
 const size_t kPublicResetNonceSize = 8;
+// Number of bytes reserved for the frame type preceding each frame.
+const size_t kFrameTypeSize = 1;
 
 // Size in bytes of the data or fec packet header.
 const size_t kPacketHeaderSize = kQuicGuidSize + kPublicFlagsSize +
@@ -318,7 +322,7 @@
 
 struct NET_EXPORT_PRIVATE CongestionFeedbackMessageTCP {
   uint16 accumulated_number_of_lost_packets;
-  uint16 receive_window;  // Number of bytes >> 4.
+  QuicByteCount receive_window;
 };
 
 struct NET_EXPORT_PRIVATE CongestionFeedbackMessageInterArrival {
@@ -331,7 +335,8 @@
 };
 
 struct NET_EXPORT_PRIVATE CongestionFeedbackMessageFixRate {
-  uint32 bitrate_in_bytes_per_second;
+  CongestionFeedbackMessageFixRate();
+  QuicBandwidth bitrate;
 };
 
 struct NET_EXPORT_PRIVATE QuicCongestionFeedbackFrame {
@@ -418,7 +423,6 @@
   // FEC protected packet.  The last protected packet's sequence number will
   // be one less than the sequence number of the FEC packet.
   QuicFecGroupNumber fec_group;
-  QuicPacketSequenceNumber min_protected_packet_sequence_number;
   // The last protected packet's sequence number will be one
   // less than the sequence number of the FEC packet.
   base::StringPiece redundancy;