OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // HttpStream provides an abstraction for a basic http streams, SPDY, and QUIC. | 5 // HttpStream provides an abstraction for a basic http streams, SPDY, and QUIC. |
6 // The HttpStream subtype is expected to manage the underlying transport | 6 // The HttpStream subtype is expected to manage the underlying transport |
7 // appropriately. For example, a basic http stream will return the transport | 7 // appropriately. For example, a basic http stream will return the transport |
8 // socket to the pool for reuse. SPDY streams on the other hand leave the | 8 // socket to the pool for reuse. SPDY streams on the other hand leave the |
9 // transport socket management to the SpdySession. | 9 // transport socket management to the SpdySession. |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "net/base/net_export.h" | 23 #include "net/base/net_export.h" |
24 #include "net/base/request_priority.h" | 24 #include "net/base/request_priority.h" |
25 #include "net/ssl/token_binding.h" | 25 #include "net/ssl/token_binding.h" |
26 | 26 |
27 namespace crypto { | 27 namespace crypto { |
28 class ECPrivateKey; | 28 class ECPrivateKey; |
29 } | 29 } |
30 | 30 |
31 namespace net { | 31 namespace net { |
32 | 32 |
| 33 struct AlternativeService; |
33 class HttpNetworkSession; | 34 class HttpNetworkSession; |
34 class HttpRequestHeaders; | 35 class HttpRequestHeaders; |
35 struct HttpRequestInfo; | 36 struct HttpRequestInfo; |
36 class HttpResponseInfo; | 37 class HttpResponseInfo; |
37 class IOBuffer; | 38 class IOBuffer; |
38 class IPEndPoint; | 39 class IPEndPoint; |
39 struct LoadTimingInfo; | 40 struct LoadTimingInfo; |
40 class NetLogWithSource; | 41 class NetLogWithSource; |
41 class SSLCertRequestInfo; | 42 class SSLCertRequestInfo; |
42 class SSLInfo; | 43 class SSLInfo; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // In practice, this means that this function will always succeed any time | 144 // In practice, this means that this function will always succeed any time |
144 // between when the full headers have been received and the stream has been | 145 // between when the full headers have been received and the stream has been |
145 // closed. | 146 // closed. |
146 virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const = 0; | 147 virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const = 0; |
147 | 148 |
148 // Get the SSLInfo associated with this stream's connection. This should | 149 // Get the SSLInfo associated with this stream's connection. This should |
149 // only be called for streams over SSL sockets, otherwise the behavior is | 150 // only be called for streams over SSL sockets, otherwise the behavior is |
150 // undefined. | 151 // undefined. |
151 virtual void GetSSLInfo(SSLInfo* ssl_info) = 0; | 152 virtual void GetSSLInfo(SSLInfo* ssl_info) = 0; |
152 | 153 |
| 154 // Returns true and populates |alternative_service| if an alternative service |
| 155 // was used to for this stream. Otherwise returns false. |
| 156 virtual bool GetAlternativeService( |
| 157 AlternativeService* alternative_service) const = 0; |
| 158 |
153 // Get the SSLCertRequestInfo associated with this stream's connection. | 159 // Get the SSLCertRequestInfo associated with this stream's connection. |
154 // This should only be called for streams over SSL sockets, otherwise the | 160 // This should only be called for streams over SSL sockets, otherwise the |
155 // behavior is undefined. | 161 // behavior is undefined. |
156 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) = 0; | 162 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) = 0; |
157 | 163 |
158 // Gets the remote endpoint of the socket that the HTTP stream is using, if | 164 // Gets the remote endpoint of the socket that the HTTP stream is using, if |
159 // any. Returns true and fills in |endpoint| if it is available; returns false | 165 // any. Returns true and fills in |endpoint| if it is available; returns false |
160 // and does not modify |endpoint| if it is unavailable. | 166 // and does not modify |endpoint| if it is unavailable. |
161 virtual bool GetRemoteEndpoint(IPEndPoint* endpoint) = 0; | 167 virtual bool GetRemoteEndpoint(IPEndPoint* endpoint) = 0; |
162 | 168 |
(...skipping 25 matching lines...) Expand all Loading... |
188 // subclass does not support renewing the stream, NULL is returned. | 194 // subclass does not support renewing the stream, NULL is returned. |
189 virtual HttpStream* RenewStreamForAuth() = 0; | 195 virtual HttpStream* RenewStreamForAuth() = 0; |
190 | 196 |
191 private: | 197 private: |
192 DISALLOW_COPY_AND_ASSIGN(HttpStream); | 198 DISALLOW_COPY_AND_ASSIGN(HttpStream); |
193 }; | 199 }; |
194 | 200 |
195 } // namespace net | 201 } // namespace net |
196 | 202 |
197 #endif // NET_HTTP_HTTP_STREAM_H_ | 203 #endif // NET_HTTP_HTTP_STREAM_H_ |
OLD | NEW |