1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "net/websockets/websocket_handshake_stream_create_helper.h"
7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h"
10 #include "net/socket/client_socket_handle.h"
11 #include "net/spdy/spdy_session.h"
12 #include "net/websockets/websocket_basic_handshake_stream.h"
16 WebSocketHandshakeStreamCreateHelper::WebSocketHandshakeStreamCreateHelper(
17 const std::vector
<std::string
>& requested_subprotocols
)
18 : requested_subprotocols_(requested_subprotocols
),
21 WebSocketHandshakeStreamCreateHelper::~WebSocketHandshakeStreamCreateHelper() {}
23 WebSocketHandshakeStreamBase
*
24 WebSocketHandshakeStreamCreateHelper::CreateBasicStream(
25 scoped_ptr
<ClientSocketHandle
> connection
,
28 new WebSocketBasicHandshakeStream(connection
.Pass(),
30 requested_subprotocols_
,
31 std::vector
<std::string
>());
34 // TODO(ricea): Create a WebSocketSpdyHandshakeStream. crbug.com/323852
35 WebSocketHandshakeStreamBase
*
36 WebSocketHandshakeStreamCreateHelper::CreateSpdyStream(
37 const base::WeakPtr
<SpdySession
>& session
,
38 bool use_relative_url
) {
39 NOTREACHED() << "Not implemented";