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

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 f0b5335885415938eab187f0569829e1b8e8ce35..31dce47ba549a981c28296922d6cae89ec73ed5b 100644
--- a/net/http/http_stream_factory_impl_request.h
+++ b/net/http/http_stream_factory_impl_request.h
@@ -13,13 +13,16 @@
#include "net/socket/ssl_client_socket.h"
namespace net {
tyoshino (SeeGerritForStatus) 2013/05/13 11:04:44 blank line please
yhirano 2013/05/13 11:45:50 Done.
+class ClientSocketHandle;
+class SpdySession;
class HttpStreamFactoryImpl::Request : public HttpStreamRequest {
public:
Request(const GURL& url,
HttpStreamFactoryImpl* factory,
HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log);
+ const BoundNetLog& net_log,
+ bool for_websocket);
virtual ~Request();
// The GURL from the HttpRequestInfo the started the Request.
@@ -68,6 +71,16 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest {
const SSLConfig& used_ssl_config,
const ProxyInfo& used_proxy_info,
HttpStreamBase* stream);
+ // Called by an attached Job if it wants to pass a spdy session
+ // to the delegate.
+ void OnSpdySessionReadyForWS(Job* job,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ scoped_refptr<SpdySession> session);
+ void OnSocketReady(Job* job,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ ClientSocketHandle* connection);
void OnStreamFailed(Job* job, int status, const SSLConfig& used_ssl_config);
void OnCertificateError(Job* job,
int status,
@@ -88,6 +101,8 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest {
const ProxyInfo& used_proxy_info,
HttpStreamBase* stream);
+ bool for_websocket() const { return for_websocket_; }
+
// HttpStreamRequest methods.
virtual int RestartTunnelWithProxyAuth(
@@ -121,10 +136,11 @@ class HttpStreamFactoryImpl::Request : public HttpStreamRequest {
// Protocol negotiated with the server.
NextProto protocol_negotiated_;
bool using_spdy_;
+ bool for_websocket_;
DISALLOW_COPY_AND_ASSIGN(Request);
};
} // 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