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

Unified Diff: net/http/http_stream_factory_impl.h

Issue 14813024: Introduce RequestWebSocketStream into HttpStreamFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 months 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
« no previous file with comments | « net/http/http_stream_factory.h ('k') | net/http/http_stream_factory_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl.h
diff --git a/net/http/http_stream_factory_impl.h b/net/http/http_stream_factory_impl.h
index 80e96ce8ab43d2707e5bac2d3ad8615f53a840af..3cfda3c41fedace7c1358d7a24a5a722e881afc3 100644
--- a/net/http/http_stream_factory_impl.h
+++ b/net/http/http_stream_factory_impl.h
@@ -28,7 +28,9 @@ class NET_EXPORT_PRIVATE HttpStreamFactoryImpl :
public HttpStreamFactory,
public HttpPipelinedHostPool::Delegate {
public:
- explicit HttpStreamFactoryImpl(HttpNetworkSession* session);
+ // RequestStream may only be called if |for_websockets| is false.
+ // RequestWebSocketStream may only be called if |for_websockets| is true.
+ HttpStreamFactoryImpl(HttpNetworkSession* session, bool for_websockets);
virtual ~HttpStreamFactoryImpl();
// HttpStreamFactory interface
@@ -40,6 +42,15 @@ class NET_EXPORT_PRIVATE HttpStreamFactoryImpl :
HttpStreamRequest::Delegate* delegate,
const BoundNetLog& net_log) OVERRIDE;
+ virtual HttpStreamRequest* RequestWebSocketStream(
+ const HttpRequestInfo& info,
+ RequestPriority priority,
+ const SSLConfig& server_ssl_config,
+ const SSLConfig& proxy_ssl_config,
+ HttpStreamRequest::Delegate* delegate,
+ WebSocketStreamBase::Factory* factory,
+ const BoundNetLog& net_log) OVERRIDE;
+
virtual void PreconnectStreams(int num_streams,
const HttpRequestInfo& info,
RequestPriority priority,
@@ -52,6 +63,8 @@ class NET_EXPORT_PRIVATE HttpStreamFactoryImpl :
virtual void OnHttpPipelinedHostHasAdditionalCapacity(
HttpPipelinedHost* host) OVERRIDE;
+ size_t num_orphaned_jobs() const { return orphaned_job_set_.size(); }
+
private:
class Request;
class Job;
@@ -62,6 +75,15 @@ class NET_EXPORT_PRIVATE HttpStreamFactoryImpl :
typedef std::map<HttpPipelinedHost::Key,
RequestVector> HttpPipeliningRequestMap;
+ HttpStreamRequest* RequestStreamInternal(
+ const HttpRequestInfo& info,
+ RequestPriority priority,
+ const SSLConfig& server_ssl_config,
+ const SSLConfig& proxy_ssl_config,
+ HttpStreamRequest::Delegate* delegate,
+ WebSocketStreamBase::Factory* factory,
+ const BoundNetLog& net_log);
+
PortAlternateProtocolPair GetAlternateProtocolRequestFor(
const GURL& original_url,
GURL* alternate_url) const;
@@ -72,14 +94,14 @@ class NET_EXPORT_PRIVATE HttpStreamFactoryImpl :
// Called when a SpdySession is ready. It will find appropriate Requests and
// fulfill them. |direct| indicates whether or not |spdy_session| uses a
// proxy.
- void OnSpdySessionReady(scoped_refptr<SpdySession> spdy_session,
- bool direct,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- bool was_npn_negotiated,
- NextProto protocol_negotiated,
- bool using_spdy,
- const BoundNetLog& net_log);
+ void OnNewSpdySessionReady(scoped_refptr<SpdySession> spdy_session,
+ bool direct,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ bool was_npn_negotiated,
+ NextProto protocol_negotiated,
+ bool using_spdy,
+ const BoundNetLog& net_log);
// Called when the Job detects that the endpoint indicated by the
// Alternate-Protocol does not work. Lets the factory update
@@ -124,6 +146,7 @@ class NET_EXPORT_PRIVATE HttpStreamFactoryImpl :
// deleted when the factory is destroyed.
std::set<const Job*> preconnect_job_set_;
+ const bool for_websockets_;
DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl);
};
« no previous file with comments | « net/http/http_stream_factory.h ('k') | net/http/http_stream_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698