Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: net/quic/core/quic_stream.cc

Issue 2825083003: Landing Recent QUIC changes until Mon Apr 17 2017 (Closed)
Patch Set: Format Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_stream.h ('k') | net/quic/core/quic_stream_sequencer_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_stream.cc
diff --git a/net/quic/core/quic_stream.cc b/net/quic/core/quic_stream.cc
index d402b4e5c537580fe0899187670acddd539919d4..733a805084ff331da83b6c6c8944af3c9ab68381 100644
--- a/net/quic/core/quic_stream.cc
+++ b/net/quic/core/quic_stream.cc
@@ -73,7 +73,8 @@ QuicStream::QuicStream(QuicStreamId id, QuicSession* session)
session_->flow_controller()),
connection_flow_controller_(session_->flow_controller()),
stream_contributes_to_connection_flow_control_(true),
- busy_counter_(0) {
+ busy_counter_(0),
+ add_random_padding_after_fin_(false) {
SetFromConfig();
}
@@ -356,7 +357,11 @@ QuicConsumedData QuicStream::WritevDataInner(
QuicStreamOffset offset,
bool fin,
QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) {
- return session()->WritevData(this, id(), iov, offset, fin,
+ StreamSendingState state = fin ? FIN : NO_FIN;
+ if (fin && add_random_padding_after_fin_) {
+ state = FIN_AND_PADDING;
+ }
+ return session()->WritevData(this, id(), iov, offset, state,
std::move(ack_listener));
}
@@ -483,4 +488,8 @@ void QuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) {
}
}
+void QuicStream::AddRandomPaddingAfterFin() {
+ add_random_padding_after_fin_ = true;
+}
+
} // namespace net
« no previous file with comments | « net/quic/core/quic_stream.h ('k') | net/quic/core/quic_stream_sequencer_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698