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

Unified Diff: net/spdy/spdy_stream_test_util.h

Issue 15936003: [SPDY] Refactor SpdyStream::Delegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 7 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 518231616dd1cd1323abac5167244e9aa7c2afed..fb2520d2857171ea65f71f490b34e8df904e44e8 100644
--- a/net/spdy/spdy_stream_test_util.h
+++ b/net/spdy/spdy_stream_test_util.h
@@ -26,12 +26,10 @@ class ClosingDelegate : public SpdyStream::Delegate {
virtual ~ClosingDelegate();
// SpdyStream::Delegate implementation.
- virtual void OnSendRequestHeadersComplete() OVERRIDE;
- virtual void OnSendBody() OVERRIDE;
- virtual void OnSendBodyComplete() OVERRIDE;
- virtual int OnResponseReceived(const SpdyHeaderBlock& response,
- base::Time response_time,
- int status) OVERRIDE;
+ virtual void OnRequestHeadersSent() OVERRIDE;
+ virtual int OnResponseHeadersReceived(const SpdyHeaderBlock& response,
+ base::Time response_time,
+ int status) OVERRIDE;
virtual int OnDataReceived(scoped_ptr<SpdyBuffer> buffer) OVERRIDE;
virtual void OnDataSent() OVERRIDE;
virtual void OnClose(int status) OVERRIDE;
@@ -50,12 +48,10 @@ class StreamDelegateBase : public SpdyStream::Delegate {
explicit StreamDelegateBase(const base::WeakPtr<SpdyStream>& stream);
virtual ~StreamDelegateBase();
- virtual void OnSendRequestHeadersComplete() OVERRIDE;
- virtual void OnSendBody() = 0;
- virtual void OnSendBodyComplete() = 0;
- virtual int OnResponseReceived(const SpdyHeaderBlock& response,
- base::Time response_time,
- int status) OVERRIDE;
+ virtual void OnRequestHeadersSent() OVERRIDE;
+ virtual int OnResponseHeadersReceived(const SpdyHeaderBlock& response,
+ base::Time response_time,
+ int status) OVERRIDE;
virtual int OnDataReceived(scoped_ptr<SpdyBuffer> buffer) OVERRIDE;
virtual void OnDataSent() OVERRIDE;
virtual void OnClose(int status) OVERRIDE;
@@ -96,12 +92,9 @@ class StreamDelegateDoNothing : public StreamDelegateBase {
public:
StreamDelegateDoNothing(const base::WeakPtr<SpdyStream>& stream);
virtual ~StreamDelegateDoNothing();
-
- virtual void OnSendBody() OVERRIDE;
- virtual void OnSendBodyComplete() OVERRIDE;
};
-// Test delegate that sends data immediately in OnResponseReceived().
+// Test delegate that sends data immediately in OnResponseHeadersReceived().
class StreamDelegateSendImmediate : public StreamDelegateBase {
public:
// |data| can be NULL.
@@ -109,11 +102,9 @@ class StreamDelegateSendImmediate : public StreamDelegateBase {
base::StringPiece data);
virtual ~StreamDelegateSendImmediate();
- virtual void OnSendBody() OVERRIDE;
- virtual void OnSendBodyComplete() OVERRIDE;
- virtual int OnResponseReceived(const SpdyHeaderBlock& response,
- base::Time response_time,
- int status) OVERRIDE;
+ virtual int OnResponseHeadersReceived(const SpdyHeaderBlock& response,
+ base::Time response_time,
+ int status) OVERRIDE;
private:
base::StringPiece data_;
@@ -126,8 +117,7 @@ class StreamDelegateWithBody : public StreamDelegateBase {
base::StringPiece data);
virtual ~StreamDelegateWithBody();
- virtual void OnSendBody() OVERRIDE;
- virtual void OnSendBodyComplete() OVERRIDE;
+ virtual void OnRequestHeadersSent() OVERRIDE;
private:
scoped_refptr<StringIOBuffer> buf_;
« 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