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

Unified Diff: net/quic/quic_spdy_session.cc

Issue 2115033002: Adds QUIC_VERSION_36 which adds support to force HOL blocking between streams for measurement purpo… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@126085461
Patch Set: typo Created 4 years, 5 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/quic_spdy_session.h ('k') | net/quic/quic_spdy_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_spdy_session.cc
diff --git a/net/quic/quic_spdy_session.cc b/net/quic/quic_spdy_session.cc
index ef0a422031cdddbe5b34b1115cd0671f6cb1844f..fe1923ac610620adba449968759a66ae21c793b1 100644
--- a/net/quic/quic_spdy_session.cc
+++ b/net/quic/quic_spdy_session.cc
@@ -16,7 +16,7 @@ namespace net {
QuicSpdySession::QuicSpdySession(QuicConnection* connection,
const QuicConfig& config)
- : QuicSession(connection, config) {}
+ : QuicSession(connection, config), force_hol_blocking_(false) {}
QuicSpdySession::~QuicSpdySession() {
// Set the streams' session pointers in closed and dynamic stream lists
@@ -153,6 +153,32 @@ void QuicSpdySession::OnConfigNegotiated() {
config()->HasClientSentConnectionOption(kDHDT, perspective())) {
headers_stream_->DisableHpackDynamicTable();
}
+ const QuicVersion version = connection()->version();
+ if (version > QUIC_VERSION_35 && config()->ForceHolBlocking(perspective())) {
+ force_hol_blocking_ = true;
+ // Autotuning makes sure that the headers stream flow control does
+ // not get in the way, and normal stream and connection level flow
+ // control are active anyway. This is really only for the client
+ // side (and mainly there just in tests and toys), where
+ // autotuning and/or large buffers are not enabled by default.
+ headers_stream_->flow_controller()->set_auto_tune_receive_window(true);
+ }
+}
+
+void QuicSpdySession::OnStreamFrameData(QuicStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) {
+ QuicSpdyStream* stream = GetSpdyDataStream(stream_id);
+ if (stream == nullptr) {
+ return;
+ }
+ const QuicStreamOffset offset =
+ stream->flow_controller()->highest_received_byte_offset();
+ const QuicStreamFrame frame(stream_id, fin, offset, StringPiece(data, len));
+ DVLOG(1) << "De-encapsulating DATA frame for stream " << stream_id
+ << " offset " << offset << " len " << len << " fin " << fin;
+ OnStreamFrame(frame);
}
} // namespace net
« no previous file with comments | « net/quic/quic_spdy_session.h ('k') | net/quic/quic_spdy_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698