Chromium Code Reviews| Index: net/http/http_stream_factory.h |
| diff --git a/net/http/http_stream_factory.h b/net/http/http_stream_factory.h |
| index c131897a5a5a44a52df1c26fd31e9c52f7d1cf99..3b4ec99f78b07d83c81b086bac7927803238ed12 100644 |
| --- a/net/http/http_stream_factory.h |
| +++ b/net/http/http_stream_factory.h |
| @@ -29,6 +29,7 @@ namespace net { |
| class AuthCredentials; |
| class BoundNetLog; |
| +class ClientSocketHandle; |
| class HostMappingRules; |
| class HostPortPair; |
| class HttpAuthController; |
| @@ -38,6 +39,7 @@ class HttpStreamBase; |
| class ProxyInfo; |
| class SSLCertRequestInfo; |
| class SSLInfo; |
| +class SpdySession; |
| struct HttpRequestInfo; |
| struct SSLConfig; |
| @@ -67,6 +69,33 @@ class NET_EXPORT_PRIVATE HttpStreamRequest { |
| const ProxyInfo& used_proxy_info, |
| HttpStreamBase* stream) = 0; |
| + // This is another success case. |
|
Adam Rice
2013/05/13 13:03:03
How about "This is a success case for WebSockets"
yhirano
2013/05/14 05:43:53
Done.
|
| + // Some factory can call this function instead of OnStreamReady. |
|
Adam Rice
2013/05/13 13:03:03
It is probably better to specifically say RequestS
yhirano
2013/05/14 05:43:53
I deleted this line.
|
| + // |connection| is now owned by the delegate. |
| + // |used_ssl_config| indicates the actual SSL configuration used for this |
| + // stream, since the HttpStreamRequest may have modified the configuration |
| + // during stream processing. |
| + // |used_proxy_info| indicates the actual ProxyInfo used for this stream, |
| + // since the HttpStreamRequest performs the proxy resolution. |
| + virtual void OnSocketReady( |
| + const SSLConfig& used_ssl_config, |
| + const ProxyInfo& used_proxy_info, |
| + ClientSocketHandle* connection) = 0; |
| + |
| + // This is another success case. |
| + // Some factory can call this function instead of OnStreamReady. |
| + // |session| is referenced by the caller. |
| + // You can create and hold a scoped_refptr pointer to retain it. |
|
Adam Rice
2013/05/13 13:03:03
Better to say "you should" rather than "you can" h
yhirano
2013/05/14 05:43:53
On 2013/05/13 13:03:03, Adam Rice wrote:
> Better
|
| + // |used_ssl_config| indicates the actual SSL configuration used for this |
| + // stream, since the HttpStreamRequest may have modified the configuration |
| + // during stream processing. |
| + // |used_proxy_info| indicates the actual ProxyInfo used for this stream, |
| + // since the HttpStreamRequest performs the proxy resolution. |
| + virtual void OnSpdySessionReady( |
| + const SSLConfig& used_ssl_config, |
| + const ProxyInfo& used_proxy_info, |
| + SpdySession* session) = 0; |
| + |
| // This is the failure to create a stream case. |
| // |used_ssl_config| indicates the actual SSL configuration used for this |
| // stream, since the HttpStreamRequest may have modified the configuration |
| @@ -169,7 +198,7 @@ class NET_EXPORT HttpStreamFactory { |
| // Virtual interface methods. |
| // Request a stream. |
| - // Will callback to the HttpStreamRequestDelegate upon completion. |
| + // Will call delegate->OnStreamReady upon completion. |
| virtual HttpStreamRequest* RequestStream( |
| const HttpRequestInfo& info, |
| RequestPriority priority, |
| @@ -178,6 +207,17 @@ class NET_EXPORT HttpStreamFactory { |
| HttpStreamRequest::Delegate* delegate, |
| const BoundNetLog& net_log) = 0; |
| + // Request a stream part for a websocket connection. |
|
Adam Rice
2013/05/13 13:03:03
I do not understand the word "part" in this contex
yhirano
2013/05/14 05:43:53
Done.
|
| + // Will call delegate->OnSocketReady or delegate->OnSpdySessionReady |
| + // upon completion. |
| + virtual HttpStreamRequest* RequestStreamForWebSocket( |
| + const HttpRequestInfo& info, |
| + RequestPriority priority, |
| + const SSLConfig& server_ssl_config, |
| + const SSLConfig& proxy_ssl_config, |
| + HttpStreamRequest::Delegate* delegate, |
| + const BoundNetLog& net_log) = 0; |
| + |
| // Requests that enough connections for |num_streams| be opened. |
| virtual void PreconnectStreams(int num_streams, |
| const HttpRequestInfo& info, |