WebSocketHandshakeStreamCreateHelper is an internal class that stores the data that is needed to create a WebSocketBasicHandshakeStream.
This CL also adds a real implementation of WebSocketStream::CreateAndConnectStream().
This CL depends on https://codereview.chromium.org/23500007/ to compile.
The tests for this CL are in https://codereview.chromium.org/64133006/
BUG=265329
Review URL: https://codereview.chromium.org/21011003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237865 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/websockets/websocket_handshake_stream_base.h b/net/websockets/websocket_handshake_stream_base.h
index a003bfe..71d8321 100644
--- a/net/websockets/websocket_handshake_stream_base.h
+++ b/net/websockets/websocket_handshake_stream_base.h
@@ -28,7 +28,10 @@
// HttpStreamBase.
class NET_EXPORT WebSocketHandshakeStreamBase : public HttpStreamBase {
public:
- class CreateHelper : public base::SupportsUserData::Data {
+ // An object that stores data needed for the creation of a
+ // WebSocketBasicHandshakeStream object. A new CreateHelper is used for each
+ // WebSocket connection.
+ class NET_EXPORT_PRIVATE CreateHelper : public base::SupportsUserData::Data {
public:
// Returns a key to use to lookup this object in a URLRequest object. It is
// different from any other key that is supplied to
@@ -39,7 +42,8 @@
// Create a WebSocketBasicHandshakeStream. This is called after the
// underlying connection has been established but before any handshake data
- // has been transferred.
+ // has been transferred. This can be called more than once in the case that
+ // HTTP authentication is needed.
virtual WebSocketHandshakeStreamBase* CreateBasicStream(
scoped_ptr<ClientSocketHandle> connection,
bool using_proxy) = 0;