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

Unified Diff: net/http/http_network_transaction.h

Issue 23856018: Changes to HttpNetworkTransaction for WebSocket Handshake (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Standardised condition for WebSocket handshake. Created 7 years, 1 month 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_network_transaction.h
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index b0950a2ecec652617613267991108fed431cca0b..d16412cbdb422b733f1df25a7e062a2831cd2359 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -21,6 +21,7 @@
#include "net/http/http_transaction.h"
#include "net/proxy/proxy_service.h"
#include "net/ssl/ssl_config_service.h"
+#include "net/websockets/websocket_handshake_stream_base.h"
namespace net {
@@ -68,6 +69,8 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
virtual bool GetLoadTimingInfo(
LoadTimingInfo* load_timing_info) const OVERRIDE;
virtual void SetPriority(RequestPriority priority) OVERRIDE;
+ virtual void SetWebSocketHandshakeStreamFactory(
+ WebSocketHandshakeStreamBase::Factory* factory) OVERRIDE;
// HttpStreamRequest::Delegate methods:
virtual void OnStreamReady(const SSLConfig& used_ssl_config,
@@ -242,6 +245,9 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
// Get the {scheme, host, path, port} for the authentication target
GURL AuthURL(HttpAuth::Target target) const;
+ // Returns true if this transaction is for a WebSocket handshake
+ bool ForWebSocketHandshake() const;
+
// Debug helper.
static std::string DescribeState(State state);
@@ -306,6 +312,11 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
// read from the socket until the tunnel is done.
bool establishing_tunnel_;
+ // The factory to use to create WebSocketHandshakeStreamBase objects. Only
+ // relevant when establishing a WebSocket connection.
+ WebSocketHandshakeStreamBase::Factory*
+ websocket_handshake_stream_base_factory_;
+
DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction);
};

Powered by Google App Engine
This is Rietveld 408576698