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

Unified Diff: net/spdy/spdy_proxy_client_socket.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_io_buffer.cc ('k') | net/spdy/spdy_proxy_client_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_proxy_client_socket.h
diff --git a/net/spdy/spdy_proxy_client_socket.h b/net/spdy/spdy_proxy_client_socket.h
index 8d3f047bf90e9531d1ef9d4a4cf5459685e3b582..e25e1e3acf92cef1b5bbadccfc45d010c402daa2 100644
--- a/net/spdy/spdy_proxy_client_socket.h
+++ b/net/spdy/spdy_proxy_client_socket.h
@@ -5,8 +5,8 @@
#ifndef NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_
#define NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_
-#include <string>
#include <list>
+#include <string>
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
@@ -21,6 +21,7 @@
#include "net/http/proxy_client_socket.h"
#include "net/spdy/spdy_http_stream.h"
#include "net/spdy/spdy_protocol.h"
+#include "net/spdy/spdy_read_queue.h"
#include "net/spdy/spdy_session.h"
#include "net/spdy/spdy_stream.h"
@@ -97,7 +98,7 @@ class NET_EXPORT_PRIVATE SpdyProxyClientSocket : public ProxyClientSocket,
base::Time response_time,
int status) OVERRIDE;
virtual void OnHeadersSent() OVERRIDE;
- virtual int OnDataReceived(const char* data, int length) OVERRIDE;
+ virtual int OnDataReceived(scoped_ptr<SpdyBuffer> buffer) OVERRIDE;
virtual void OnDataSent(size_t bytes_sent) OVERRIDE;
virtual void OnClose(int status) OVERRIDE;
@@ -126,7 +127,7 @@ class NET_EXPORT_PRIVATE SpdyProxyClientSocket : public ProxyClientSocket,
// Populates |user_buffer_| with as much read data as possible
// and returns the number of bytes read.
- int PopulateUserReadBuffer();
+ size_t PopulateUserReadBuffer(char* out, size_t len);
State next_state_;
@@ -149,10 +150,11 @@ class NET_EXPORT_PRIVATE SpdyProxyClientSocket : public ProxyClientSocket,
scoped_refptr<HttpAuthController> auth_;
// We buffer the response body as it arrives asynchronously from the stream.
- std::list<scoped_refptr<DrainableIOBuffer> > read_buffer_;
+ SpdyReadQueue read_buffer_queue_;
// User provided buffer for the Read() response.
- scoped_refptr<DrainableIOBuffer> user_buffer_;
+ scoped_refptr<IOBuffer> user_buffer_;
+ size_t user_buffer_len_;
// User specified number of bytes to be written.
int write_buffer_len_;
« no previous file with comments | « net/spdy/spdy_io_buffer.cc ('k') | net/spdy/spdy_proxy_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698