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..76d969b3b5167cf5e9fb2b9ac3cb4a000dc22826 100644 |
--- a/net/http/http_stream_factory_impl_request.h |
+++ b/net/http/http_stream_factory_impl_request.h |
@@ -23,12 +23,20 @@ class SpdySession; |
class HttpStreamFactoryImpl::Request : public HttpStreamRequest { |
public: |
+ // Indicates which type of stream is requested. |
+ enum StreamType { |
+ BIDIRECTIONAL_STREAM_SPDY_JOB, |
+ HTTP_STREAM, |
+ }; |
+ |
Request(const GURL& url, |
HttpStreamFactoryImpl* factory, |
HttpStreamRequest::Delegate* delegate, |
WebSocketHandshakeStreamBase::CreateHelper* |
websocket_handshake_stream_create_helper, |
- const BoundNetLog& net_log); |
+ const BoundNetLog& net_log, |
+ StreamType stream_type); |
+ |
~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_spdy_job| is null when |for_bidirectional| is false. |
+ void OnNewSpdySessionReady( |
+ Job* job, |
+ scoped_ptr<HttpStream> stream, |
+ scoped_ptr<BidirectionalStreamJob> bidirectional_stream_spdy_job, |
+ 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 OnBidirectionalStreamJobReady(Job* job, |
+ const SSLConfig& used_ssl_config, |
+ const ProxyInfo& used_proxy_info, |
+ BidirectionalStreamJob* 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); |
}; |