OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_SPDY_SPDY_HTTP_STREAM_H_ | 5 #ifndef NET_SPDY_SPDY_HTTP_STREAM_H_ |
6 #define NET_SPDY_SPDY_HTTP_STREAM_H_ | 6 #define NET_SPDY_SPDY_HTTP_STREAM_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 UploadDataStream* request_body, | 48 UploadDataStream* request_body, |
49 HttpResponseInfo* response, | 49 HttpResponseInfo* response, |
50 CompletionCallback* callback); | 50 CompletionCallback* callback); |
51 virtual uint64 GetUploadProgress() const; | 51 virtual uint64 GetUploadProgress() const; |
52 virtual int ReadResponseHeaders(CompletionCallback* callback); | 52 virtual int ReadResponseHeaders(CompletionCallback* callback); |
53 virtual const HttpResponseInfo* GetResponseInfo() const; | 53 virtual const HttpResponseInfo* GetResponseInfo() const; |
54 virtual int ReadResponseBody(IOBuffer* buf, | 54 virtual int ReadResponseBody(IOBuffer* buf, |
55 int buf_len, | 55 int buf_len, |
56 CompletionCallback* callback); | 56 CompletionCallback* callback); |
57 virtual void Close(bool not_reusable); | 57 virtual void Close(bool not_reusable); |
58 virtual HttpStream* RenewStreamForAuth() { return NULL; } | 58 virtual HttpStream* RenewStreamForAuth(); |
59 virtual bool IsResponseBodyComplete() const { | 59 virtual bool IsResponseBodyComplete() const; |
60 if (!stream_) | 60 virtual bool CanFindEndOfResponse() const; |
61 return false; | 61 virtual bool IsMoreDataBuffered() const; |
62 return stream_->closed(); | 62 virtual bool IsConnectionReused() const; |
63 } | 63 virtual void SetConnectionReused(); |
64 virtual bool CanFindEndOfResponse() const { return true; } | |
65 virtual bool IsMoreDataBuffered() const { return false; } | |
66 virtual bool IsConnectionReused() const { | |
67 return spdy_session_->IsReused(); | |
68 } | |
69 virtual void SetConnectionReused() { | |
70 // SPDY doesn't need an indicator here. | |
71 } | |
72 virtual void GetSSLInfo(SSLInfo* ssl_info); | 64 virtual void GetSSLInfo(SSLInfo* ssl_info); |
73 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); | 65 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); |
74 | 66 |
75 // SpdyStream::Delegate methods: | 67 // SpdyStream::Delegate methods: |
76 virtual bool OnSendHeadersComplete(int status); | 68 virtual bool OnSendHeadersComplete(int status); |
77 virtual int OnSendBody(); | 69 virtual int OnSendBody(); |
78 virtual bool OnSendBodyComplete(int status); | 70 virtual bool OnSendBodyComplete(int status); |
79 virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response, | 71 virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response, |
80 base::Time response_time, | 72 base::Time response_time, |
81 int status); | 73 int status); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 124 |
133 // Is this spdy stream direct to the origin server (or to a proxy). | 125 // Is this spdy stream direct to the origin server (or to a proxy). |
134 bool direct_; | 126 bool direct_; |
135 | 127 |
136 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); | 128 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); |
137 }; | 129 }; |
138 | 130 |
139 } // namespace net | 131 } // namespace net |
140 | 132 |
141 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ | 133 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ |
OLD | NEW |