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

Unified Diff: net/spdy/spdy_stream.cc

Issue 959743002: Account for HTTP/2 padding in receive windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more mock implementation. Created 5 years, 9 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/spdy/spdy_stream.h ('k') | net/spdy/spdy_test_util_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream.cc
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index fc2866b63d85c28d13337fc108b67f5eea591c28..85b20165a2ddeed39728008c288dfef67498f473 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -526,6 +526,17 @@ void SpdyStream::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
delegate_->OnDataReceived(buffer.Pass());
}
+void SpdyStream::OnPaddingConsumed(size_t len) {
+ if (session_->flow_control_state() >= SpdySession::FLOW_CONTROL_STREAM) {
+ // Decrease window size because padding bytes are received.
+ // Increase window size because padding bytes are consumed (by discarding).
+ // Net result: |session_unacked_recv_window_bytes_| increases by |len|,
+ // |session_recv_window_size_| does not change.
+ DecreaseRecvWindowSize(static_cast<int32>(len));
+ IncreaseRecvWindowSize(static_cast<int32>(len));
+ }
+}
+
void SpdyStream::OnFrameWriteComplete(SpdyFrameType frame_type,
size_t frame_size) {
DCHECK_NE(type_, SPDY_PUSH_STREAM);
« no previous file with comments | « net/spdy/spdy_stream.h ('k') | net/spdy/spdy_test_util_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698