Index: net/http/http_stream_factory_impl_job.h |
diff --git a/net/http/http_stream_factory_impl_job.h b/net/http/http_stream_factory_impl_job.h |
index 81b812a60833e0aab87eed5d1acdcc1a0ac1329e..8fac4dee15efe068ce43282d061ca4b912f69583 100644 |
--- a/net/http/http_stream_factory_impl_job.h |
+++ b/net/http/http_stream_factory_impl_job.h |
@@ -86,6 +86,7 @@ class HttpStreamFactoryImpl::Job { |
NextProto protocol_negotiated() const; |
bool using_spdy() const; |
const BoundNetLog& net_log() const { return net_log_; } |
+ bool for_bidirectional() const { return for_bidirectional_; } |
const SSLConfig& server_ssl_config() const; |
const SSLConfig& proxy_ssl_config() const; |
@@ -194,6 +195,7 @@ class HttpStreamFactoryImpl::Job { |
}; |
void OnStreamReadyCallback(); |
+ void OnBidirectionalStreamJobReadyCallback(); |
void OnWebSocketHandshakeStreamReadyCallback(); |
// This callback function is called when a new SPDY session is created. |
void OnNewSpdySessionReadyCallback(); |
@@ -228,9 +230,12 @@ class HttpStreamFactoryImpl::Job { |
int DoRestartTunnelAuth(); |
int DoRestartTunnelAuthComplete(int result); |
- // Creates a SpdyHttpStream from the given values and sets to |stream_|. Does |
+ // Creates a SpdyHttpStream or a BidirectionalStreamJob from the given values |
+ // and sets to |stream_| or |bidirectional_stream_job_| respectively. Does |
// nothing if |stream_factory_| is for WebSockets. |
- int SetSpdyHttpStream(base::WeakPtr<SpdySession> session, bool direct); |
+ int SetSpdyHttpStreamOrBidirectionalStreamJob( |
+ base::WeakPtr<SpdySession> session, |
+ bool direct); |
// Returns to STATE_INIT_CONNECTION and resets some state. |
void ReturnToStateInitConnection(bool close_connection); |
@@ -368,6 +373,7 @@ class HttpStreamFactoryImpl::Job { |
scoped_ptr<HttpStream> stream_; |
scoped_ptr<WebSocketHandshakeStreamBase> websocket_stream_; |
+ scoped_ptr<BidirectionalStreamJob> bidirectional_stream_job_; |
// True if we negotiated NPN. |
bool was_npn_negotiated_; |
@@ -393,6 +399,9 @@ class HttpStreamFactoryImpl::Job { |
JobStatus job_status_; |
JobStatus other_job_status_; |
+ // True if BidirectionalStreamJob is requested. |
+ bool for_bidirectional_; |
+ |
base::WeakPtrFactory<Job> ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(Job); |