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

Unified Diff: net/spdy/spdy_stream_test_util.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: Rebase 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
« no previous file with comments | « net/spdy/spdy_stream_spdy3_unittest.cc ('k') | net/spdy/spdy_stream_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream_test_util.h
diff --git a/net/spdy/spdy_stream_test_util.h b/net/spdy/spdy_stream_test_util.h
index a7ca912700fe53ce74358f590897a6847d312630..1e59ad8a35484896d6bd271da2cdd64a6d4538d6 100644
--- a/net/spdy/spdy_stream_test_util.h
+++ b/net/spdy/spdy_stream_test_util.h
@@ -11,6 +11,7 @@
#include "base/strings/string_piece.h"
#include "net/base/io_buffer.h"
#include "net/base/test_completion_callback.h"
+#include "net/spdy/spdy_read_queue.h"
#include "net/spdy/spdy_stream.h"
namespace net {
@@ -62,9 +63,12 @@ class StreamDelegateBase : public SpdyStream::Delegate {
// to OnClose().
int WaitForClose();
+ // Drains all data from the underlying read queue and returns it as
+ // a string.
+ std::string TakeReceivedData();
+
std::string GetResponseHeaderValue(const std::string& name) const;
bool send_headers_completed() const { return send_headers_completed_; }
- const std::string& received_data() const { return received_data_; }
int headers_sent() const { return headers_sent_; }
int data_sent() const { return data_sent_; }
@@ -76,7 +80,7 @@ class StreamDelegateBase : public SpdyStream::Delegate {
TestCompletionCallback callback_;
bool send_headers_completed_;
SpdyHeaderBlock response_;
- std::string received_data_;
+ SpdyReadQueue received_data_queue_;
int headers_sent_;
int data_sent_;
};
« no previous file with comments | « net/spdy/spdy_stream_spdy3_unittest.cc ('k') | net/spdy/spdy_stream_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698