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

Unified Diff: net/http/http_stream_factory_impl_request.h

Issue 14813024: Introduce RequestWebSocketStream into HttpStreamFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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
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 18633fa965e10873698c85ce9a1752dcccfffa1c..1743e3371f4527ef7d1bd3b1d16dc52d86b6157f 100644
--- a/net/http/http_stream_factory_impl_request.h
+++ b/net/http/http_stream_factory_impl_request.h
@@ -10,16 +10,21 @@
#include "googleurl/src/gurl.h"
#include "net/base/net_log.h"
#include "net/http/http_stream_factory_impl.h"
+#include "net/http/websocket_stream_base.h"
#include "net/socket/ssl_client_socket.h"
#include "net/spdy/spdy_session_key.h"
namespace net {
+class ClientSocketHandle;
+class SpdySession;
+
class HttpStreamFactoryImpl::Request : public HttpStreamRequest {
public:
Request(const GURL& url,
HttpStreamFactoryImpl* factory,
HttpStreamRequest::Delegate* delegate,
+ WebSocketStreamBase::Factory* websocket_stream_factory,
const BoundNetLog& net_log);
virtual ~Request();
@@ -58,9 +63,13 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest {
void RemoveRequestFromHttpPipeliningRequestMap();
// Called by an attached Job if it sets up a SpdySession.
- void OnSpdySessionReady(Job* job,
- scoped_refptr<SpdySession> spdy_session,
- bool direct);
+ void OnNewSpdySessionReady(Job* job,
+ scoped_refptr<SpdySession> spdy_session,
+ bool direct);
+
+ WebSocketStreamBase::Factory* websocket_stream_factory() {
+ return websocket_stream_factory_;
+ }
// HttpStreamRequest::Delegate methods which we implement. Note we don't
// actually subclass HttpStreamRequest::Delegate.
@@ -69,6 +78,10 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest {
const SSLConfig& used_ssl_config,
const ProxyInfo& used_proxy_info,
HttpStreamBase* stream);
+ void OnWebSocketStreamReady(Job* job,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ WebSocketStreamBase* stream);
void OnStreamFailed(Job* job, int status, const SSLConfig& used_ssl_config);
void OnCertificateError(Job* job,
int status,
@@ -106,8 +119,12 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest {
// Used to orphan all jobs in |jobs_|.
void OrphanJobs();
+ // Orphan a job if appropriate.
+ void Orphan(Job* job);
+
const GURL url_;
HttpStreamFactoryImpl* const factory_;
+ WebSocketStreamBase::Factory* const websocket_stream_factory_;
HttpStreamRequest::Delegate* const delegate_;
const BoundNetLog net_log_;
@@ -128,4 +145,4 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest {
} // namespace net
-#endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
+#endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_

Powered by Google App Engine
This is Rietveld 408576698