Index: net/http/http_stream_factory_impl_request.h |
diff --git a/net/http/http_stream_factory_impl_request.h b/net/http/http_stream_factory_impl_request.h |
index e65dac88e45600f7e1bf1d529079276284f296e8..e9eab4a145fee6d915df47965492769246111389 100644 |
--- a/net/http/http_stream_factory_impl_request.h |
+++ b/net/http/http_stream_factory_impl_request.h |
@@ -29,6 +29,14 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest { |
WebSocketHandshakeStreamBase::CreateHelper* |
websocket_handshake_stream_create_helper, |
const BoundNetLog& net_log); |
+ Request(const GURL& url, |
+ HttpStreamFactoryImpl* factory, |
+ HttpStreamRequest::Delegate* delegate, |
+ WebSocketHandshakeStreamBase::CreateHelper* |
mef
2015/09/30 16:18:16
Would it make sense to add BidirectionalStream::Cr
xunjieli
2015/10/01 18:41:16
I am not sure what the CreateHelper should do. Web
|
+ websocket_handshake_stream_create_helper, |
+ const BoundNetLog& net_log, |
+ bool for_bidirectional); |
+ |
~Request() override; |
// The GURL from the HttpRequestInfo the started the Request. |
@@ -57,10 +65,14 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest { |
void RemoveRequestFromSpdySessionRequestMap(); |
// Called by an attached Job if it sets up a SpdySession. |
- void OnNewSpdySessionReady(Job* job, |
- scoped_ptr<HttpStream> stream, |
- const base::WeakPtr<SpdySession>& spdy_session, |
- bool direct); |
+ // |stream| is null when |for_bidirectional| is true. |
+ // |bidirectional_stream| is null when |for_bidirectional| is false. |
+ void OnNewSpdySessionReady( |
+ Job* job, |
+ scoped_ptr<HttpStream> stream, |
+ scoped_ptr<BidirectionalStream> bidirectional_stream, |
+ const base::WeakPtr<SpdySession>& spdy_session, |
+ bool direct); |
// Called by an attached Job to record connection attempts made by the socket |
// layer for this stream request. |
@@ -78,6 +90,11 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest { |
const SSLConfig& used_ssl_config, |
const ProxyInfo& used_proxy_info, |
HttpStream* stream); |
+ void OnBidirectionalStreamReady(Job* job, |
+ const SSLConfig& used_ssl_config, |
+ const ProxyInfo& used_proxy_info, |
+ BidirectionalStream* stream); |
+ |
void OnWebSocketHandshakeStreamReady(Job* job, |
const SSLConfig& used_ssl_config, |
const ProxyInfo& used_proxy_info, |
@@ -114,6 +131,7 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest { |
NextProto protocol_negotiated() const override; |
bool using_spdy() const override; |
const ConnectionAttempts& connection_attempts() const override; |
+ bool for_bidirectional() const { return for_bidirectional_; } |
private: |
// Used to bind |job| to the request and orphan all other jobs in |jobs_|. |
@@ -147,6 +165,7 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest { |
bool using_spdy_; |
ConnectionAttempts connection_attempts_; |
+ const bool for_bidirectional_; |
DISALLOW_COPY_AND_ASSIGN(Request); |
}; |