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

Unified Diff: net/http/http_stream_factory_impl_job.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: Use std::move 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 side-by-side diff with in-line comments
Download patch
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_;
mef 2015/12/21 17:31:43 Forward-declare BidirectionalStreamJob?
xunjieli 2015/12/21 22:01:22 Done.
// 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);

Powered by Google App Engine
This is Rietveld 408576698