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

Unified Diff: net/spdy/spdy_stream.h

Issue 13990005: [SPDY] Replace SpdyIOBuffer with new SpdyBuffer class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix missing include 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_session_spdy3_unittest.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream.h
diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h
index 881b48ebd70b0dbd7527d82a95779296d9a9009e..fd145eadf5c9a5ba75870ba90219c1808e817649 100644
--- a/net/spdy/spdy_stream.h
+++ b/net/spdy/spdy_stream.h
@@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "googleurl/src/gurl.h"
#include "net/base/bandwidth_metrics.h"
@@ -83,9 +84,10 @@ class NET_EXPORT_PRIVATE SpdyStream
// Called when a HEADERS frame is sent.
virtual void OnHeadersSent() = 0;
- // Called when data is received.
- // Returns network error code. OK when it successfully receives data.
- virtual int OnDataReceived(const char* data, int length) = 0;
+ // Called when data is received. |buffer| may be NULL, which
+ // signals EOF. Must return OK if the data was received
+ // successfully, or a network error code otherwise.
+ virtual int OnDataReceived(scoped_ptr<SpdyBuffer> buffer) = 0;
// Called when data is sent.
virtual void OnDataSent(size_t bytes_sent) = 0;
@@ -218,7 +220,7 @@ class NET_EXPORT_PRIVATE SpdyStream
//
// |length| is the number of bytes received (at most 2^24 - 1) or 0 if
// the stream is being closed.
- void OnDataReceived(const char* buffer, size_t length);
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer);
// Called by the SpdySession when a frame has been successfully and
// completely written. |frame_size| is the total size of the frame
@@ -289,8 +291,8 @@ class NET_EXPORT_PRIVATE SpdyStream
int GetProtocolVersion() const;
private:
- class SynStreamFrameProducer;
- class HeaderFrameProducer;
+ class SynStreamBufferProducer;
+ class HeaderBufferProducer;
enum State {
STATE_NONE,
@@ -411,7 +413,7 @@ class NET_EXPORT_PRIVATE SpdyStream
int recv_bytes_;
// Data received before delegate is attached.
- std::vector<scoped_refptr<IOBufferWithSize> > pending_buffers_;
+ ScopedVector<SpdyBuffer> pending_buffers_;
SSLClientCertType domain_bound_cert_type_;
std::string domain_bound_private_key_;
« no previous file with comments | « net/spdy/spdy_session_spdy3_unittest.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698