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

Unified Diff: net/spdy/spdy_session.h

Issue 14311002: [SPDY] Avoid leaking bytes from the session flow control receive window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: net/spdy/spdy_session.h
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index 9f4357bcce9266ebe2fbb15d4477586fc36e8133..cbcd15fd7e147dd99508887346d6e3634d9637e6 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -312,13 +312,6 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
void SendStreamWindowUpdate(SpdyStreamId stream_id,
uint32 delta_window_size);
- // Called by a stream to increase this session's receive window size
- // by |delta_window_size|, which must be at least 1 and must not
- // cause this session's receive window size to overflow, possibly
- // also sending a WINDOW_UPDATE frame. Does nothing if session flow
- // control is turned off.
- void IncreaseRecvWindowSize(int32 delta_window_size);
-
// If session is closed, no new streams/transactions should be created.
bool IsClosed() const { return state_ == CLOSED; }
@@ -466,6 +459,8 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
FRIEND_TEST_ALL_PREFIXES(SpdySessionSpdy3Test, AdjustSendWindowSize31);
FRIEND_TEST_ALL_PREFIXES(SpdySessionSpdy3Test,
SessionFlowControlInactiveStream31);
+ FRIEND_TEST_ALL_PREFIXES(SpdySessionSpdy3Test,
+ SessionFlowControlNoReceiveLeaks31);
FRIEND_TEST_ALL_PREFIXES(SpdySessionSpdy3Test, SessionFlowControlEndToEnd31);
typedef std::deque<SpdyStreamRequest*> PendingStreamRequestQueue;
@@ -668,6 +663,15 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
// cause this session's send window size to go negative.
void DecreaseSendWindowSize(int32 delta_window_size);
+ // Called by SpdyBuffers (via ConsumeCallbacks) to increase this
+ // session's receive window size by |delta_window_size|, which must
+ // be at least 1 and must not cause this session's receive window
+ // size to overflow, possibly also sending a WINDOW_UPDATE
+ // frame. Also called during initialization to set the initial
+ // receive window size. Does nothing if session flow control is
+ // turned off.
+ void IncreaseRecvWindowSize(size_t delta_window_size);
+
// If session flow control is turned on, called by OnStreamFrameData
// (which is in turn called by the framer) to decrease this
// session's receive window size by |delta_window_size|, which must

Powered by Google App Engine
This is Rietveld 408576698