Chromium Code Reviews| Index: net/spdy/spdy_proxy_client_socket.h |
| =================================================================== |
| --- net/spdy/spdy_proxy_client_socket.h (revision 68026) |
| +++ net/spdy/spdy_proxy_client_socket.h (working copy) |
| @@ -15,10 +15,11 @@ |
| #include "net/base/host_port_pair.h" |
| #include "net/base/net_log.h" |
| #include "net/http/http_auth_controller.h" |
| +#include "net/http/http_proxy_tunnel_client_socket.h" |
| #include "net/http/http_request_headers.h" |
| #include "net/http/http_request_info.h" |
| #include "net/http/http_response_info.h" |
| -#include "net/socket/client_socket.h" |
| +#include "net/spdy/spdy_http_stream.h" |
| #include "net/spdy/spdy_protocol.h" |
| #include "net/spdy/spdy_session.h" |
| #include "net/spdy/spdy_stream.h" |
| @@ -35,7 +36,8 @@ |
| class SpdySession; |
| class SpdyStream; |
| -class SpdyProxyClientSocket : public ClientSocket, public SpdyStream::Delegate { |
| +class SpdyProxyClientSocket : public HttpProxyTunnelClientSocket, |
| + public SpdyStream::Delegate { |
| public: |
| // Create a socket on top of the |spdy_stream| by sending a SYN_STREAM |
| // CONNECT frame for |endpoint|. After the SYN_REPLY is received, |
| @@ -57,10 +59,21 @@ |
| return auth_; |
| } |
| - const HttpResponseInfo* GetConnectResponseInfo() const { |
| + // HttpProxyTunnelClientSocket methods: |
| + |
| + virtual const HttpResponseInfo* GetConnectResponseInfo() const { |
| return response_.headers ? &response_ : NULL; |
| } |
| + // In the event of a non-200 response to the CONNECT request, this |
| + // method may be called to return an HttpStream in order to read |
| + // the response body. |
| + virtual HttpStream* GetConnectResponseStream() { |
| + SpdyStream* stream = spdy_stream_; |
|
vandebo (ex-Chrome)
2010/12/04 00:30:37
Should this implementation go in the .cpp ?
Ryan Hamilton
2010/12/09 21:19:35
Done.
|
| + spdy_stream_ = NULL; |
| + return new SpdyHttpStream(stream); |
| + } |
| + |
| // ClientSocket methods: |
| virtual int Connect(CompletionCallback* callback); |