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

Side by Side Diff: net/http/http_stream_factory.h

Issue 1326503003: Added a net::BidirectionalStream to expose a bidirectional streaming interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Misha's comments Created 5 years 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 unified diff | Download patch
OLDNEW
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 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_H_
6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 15 matching lines...) Expand all
26 class GURL; 26 class GURL;
27 27
28 namespace base { 28 namespace base {
29 class Value; 29 class Value;
30 } 30 }
31 31
32 namespace net { 32 namespace net {
33 33
34 class AuthCredentials; 34 class AuthCredentials;
35 class BoundNetLog; 35 class BoundNetLog;
36 class BidirectionalStreamJob;
36 class HostMappingRules; 37 class HostMappingRules;
37 class HostPortPair; 38 class HostPortPair;
38 class HttpAuthController; 39 class HttpAuthController;
39 class HttpNetworkSession; 40 class HttpNetworkSession;
40 class HttpResponseInfo; 41 class HttpResponseInfo;
41 class HttpServerProperties; 42 class HttpServerProperties;
42 class HttpStream; 43 class HttpStream;
43 class ProxyInfo; 44 class ProxyInfo;
44 class SSLCertRequestInfo; 45 class SSLCertRequestInfo;
45 class SSLInfo; 46 class SSLInfo;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // |used_ssl_config| indicates the actual SSL configuration used for this 78 // |used_ssl_config| indicates the actual SSL configuration used for this
78 // stream, since the HttpStreamRequest may have modified the configuration 79 // stream, since the HttpStreamRequest may have modified the configuration
79 // during stream processing. 80 // during stream processing.
80 // |used_proxy_info| indicates the actual ProxyInfo used for this stream, 81 // |used_proxy_info| indicates the actual ProxyInfo used for this stream,
81 // since the HttpStreamRequest performs the proxy resolution. 82 // since the HttpStreamRequest performs the proxy resolution.
82 virtual void OnWebSocketHandshakeStreamReady( 83 virtual void OnWebSocketHandshakeStreamReady(
83 const SSLConfig& used_ssl_config, 84 const SSLConfig& used_ssl_config,
84 const ProxyInfo& used_proxy_info, 85 const ProxyInfo& used_proxy_info,
85 WebSocketHandshakeStreamBase* stream) = 0; 86 WebSocketHandshakeStreamBase* stream) = 0;
86 87
88 virtual void OnBidirectionalStreamJobReady(
89 const SSLConfig& used_ssl_config,
90 const ProxyInfo& used_proxy_info,
91 BidirectionalStreamJob* stream) = 0;
92
87 // This is the failure to create a stream case. 93 // This is the failure to create a stream case.
88 // |used_ssl_config| indicates the actual SSL configuration used for this 94 // |used_ssl_config| indicates the actual SSL configuration used for this
89 // stream, since the HttpStreamRequest may have modified the configuration 95 // stream, since the HttpStreamRequest may have modified the configuration
90 // during stream processing. If an SSL handshake failed, |ssl_failure_state| 96 // during stream processing. If an SSL handshake failed, |ssl_failure_state|
91 // is the state the SSLClientSocket was in. 97 // is the state the SSLClientSocket was in.
92 virtual void OnStreamFailed(int status, 98 virtual void OnStreamFailed(int status,
93 const SSLConfig& used_ssl_config, 99 const SSLConfig& used_ssl_config,
94 SSLFailureState ssl_failure_state) = 0; 100 SSLFailureState ssl_failure_state) = 0;
95 101
96 // Called when we have a certificate error for the request. 102 // Called when we have a certificate error for the request.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // completion. 221 // completion.
216 virtual HttpStreamRequest* RequestWebSocketHandshakeStream( 222 virtual HttpStreamRequest* RequestWebSocketHandshakeStream(
217 const HttpRequestInfo& info, 223 const HttpRequestInfo& info,
218 RequestPriority priority, 224 RequestPriority priority,
219 const SSLConfig& server_ssl_config, 225 const SSLConfig& server_ssl_config,
220 const SSLConfig& proxy_ssl_config, 226 const SSLConfig& proxy_ssl_config,
221 HttpStreamRequest::Delegate* delegate, 227 HttpStreamRequest::Delegate* delegate,
222 WebSocketHandshakeStreamBase::CreateHelper* create_helper, 228 WebSocketHandshakeStreamBase::CreateHelper* create_helper,
223 const BoundNetLog& net_log) = 0; 229 const BoundNetLog& net_log) = 0;
224 230
231 // Request a BidirectionalStreamJob.
232 // Will call delegate->OnBidirectionalStreamJobReady on successful
233 // completion.
234 virtual HttpStreamRequest* RequestBidirectionalStreamJob(
235 const HttpRequestInfo& info,
236 RequestPriority priority,
237 const SSLConfig& server_ssl_config,
238 const SSLConfig& proxy_ssl_config,
239 HttpStreamRequest::Delegate* delegate,
240 const BoundNetLog& net_log) = 0;
241
225 // Requests that enough connections for |num_streams| be opened. 242 // Requests that enough connections for |num_streams| be opened.
226 virtual void PreconnectStreams(int num_streams, 243 virtual void PreconnectStreams(int num_streams,
227 const HttpRequestInfo& info, 244 const HttpRequestInfo& info,
228 const SSLConfig& server_ssl_config, 245 const SSLConfig& server_ssl_config,
229 const SSLConfig& proxy_ssl_config) = 0; 246 const SSLConfig& proxy_ssl_config) = 0;
230 247
231 virtual const HostMappingRules* GetHostMappingRules() const = 0; 248 virtual const HostMappingRules* GetHostMappingRules() const = 0;
232 249
233 // Static settings 250 // Static settings
234 251
(...skipping 15 matching lines...) Expand all
250 static bool spdy_enabled_; 267 static bool spdy_enabled_;
251 268
252 HostPortPair RewriteHost(HostPortPair host_port_pair); 269 HostPortPair RewriteHost(HostPortPair host_port_pair);
253 270
254 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); 271 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory);
255 }; 272 };
256 273
257 } // namespace net 274 } // namespace net
258 275
259 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ 276 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698