Cleaning up constructors for QuicData, QuicPacket and QuicEncryptedPacket to not take unnamed bool values.
Merge internal change: 41194576
Simplify the interface between the QuicConnection and the congestion control system. Add a QuicCongestionManager to wrap the the SendScheduler and ReceiptMetricsCollector in a single class for all congestion-related functionality. (Narrows the SendScheduler-specific interface to just those methods called by the QuicConnection.) This is a minor cleanup in advance of moving the RTO management out of QuicConnection (since it is algorithm specific).
Merge internal change: 41188949
Refactor SendStreamData to frame one StreamFrame at once and send it, instea d of framing and serializing multiple in DataToStream.
Merge internal change: 41155771
Expand the 48 bit on-the-wire packet sequence number into the full 64 bit se quence number.
Merge internal change: 41147680
Enable encryption of private flags.
Merge internal change: 41147034
Splitting flags into private and public and implementing framing for both.
Merge internal change: 41145985
Add a zero length padding frame.
Merge internal change: 41141396
Remove "support" for PDUs
Merge internal change: 41133537
Remove the Clear method from QuicPacketCreator options, and explicitly initialize all field in the constructor.
Merge internal change: 41128100
Cleanup from chrome cl 11820003
Merge internal change: 41118012
Refactor to pull out connection close so that connection can be closed without sending connection close frame.
Merge internal change: 41026182
Keep a bool to check if a QuicPacket is an FEC packet instead of taking whol e packet flag as an input to the constructor.
Merge internal change: 41026127
Remove default constructors for QuicTime and QuicTime::Delta and used static Zero() methods instead to make it clear what value is being used. One annoying side-effect is this means that maps which have these objects as keys can't not be accessed with []. Thankfully, this is not a huge problem. (It only affects us in one place). But I can add the default constructors back to support this use case, if necessary. (I'd prefer not to since I think Zero() is more clear, but can go either way).
Merge internal change: 40993340
Replace boolean literals with named constants ini QuicConnection::SendPacket() calls.
Merge internal change: 40991762
Consistently use Retransmit/Retransmission (instead of Resend) when talking about sending QUIC data a second time (in a new packet).
Merge internal change: 40988697
Move the logic for RTO timeout handling from the Helper to the QuicConnection.
Merge internal change: 40980852
Fixing a bug where a non-existant frame corresponding to an FEC was being deleted.
Merge internal change: 40883214
Change the QUIC FEC group number from an ad-hoc id to the sequence number of the first packet in the group. Over the wire, however, send a 1 byte delta from the sequence number of the current packet to the sequence number of the first protected packet in the group.
Merge internal change: 40881017
[email protected]
Review URL: https://chromiumcodereview.appspot.com/11959039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177612 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc
index 5c38cbd01..1de1eb9 100644
--- a/net/quic/reliable_quic_stream.cc
+++ b/net/quic/reliable_quic_stream.cc
@@ -111,10 +111,11 @@
if (queued_data_.empty()) {
consumed_data = WriteDataInternal(string(data.data(), data.length()), fin);
+ DCHECK_LE(consumed_data.bytes_consumed, data.length());
}
- // if there's unconsumed data or an unconsumed fin, queue it.
- if (consumed_data.bytes_consumed != data.length() ||
+ // If there's unconsumed data or an unconsumed fin, queue it.
+ if (consumed_data.bytes_consumed < data.length() ||
(fin && !consumed_data.fin_consumed)) {
queued_data_.push_back(
string(data.data() + consumed_data.bytes_consumed,