| Index: net/websockets/websocket_channel.cc
|
| diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc
|
| index 013b64a92ec8e53b80018ae767fb14474acf09f3..12567198177c6f960842c605ecb5e184cb8253fc 100644
|
| --- a/net/websockets/websocket_channel.cc
|
| +++ b/net/websockets/websocket_channel.cc
|
| @@ -337,12 +337,14 @@ WebSocketChannel::~WebSocketChannel() {
|
| void WebSocketChannel::SendAddChannelRequest(
|
| const GURL& socket_url,
|
| const std::vector<std::string>& requested_subprotocols,
|
| - const url::Origin& origin) {
|
| + const url::Origin& origin,
|
| + const std::string& additional_headers) {
|
| // Delegate to the tested version.
|
| SendAddChannelRequestWithSuppliedCreator(
|
| socket_url,
|
| requested_subprotocols,
|
| origin,
|
| + additional_headers,
|
| base::Bind(&WebSocketStream::CreateAndConnectStream));
|
| }
|
|
|
| @@ -545,9 +547,10 @@ void WebSocketChannel::SendAddChannelRequestForTesting(
|
| const GURL& socket_url,
|
| const std::vector<std::string>& requested_subprotocols,
|
| const url::Origin& origin,
|
| + const std::string& additional_headers,
|
| const WebSocketStreamCreator& creator) {
|
| SendAddChannelRequestWithSuppliedCreator(
|
| - socket_url, requested_subprotocols, origin, creator);
|
| + socket_url, requested_subprotocols, origin, additional_headers, creator);
|
| }
|
|
|
| void WebSocketChannel::SetClosingHandshakeTimeoutForTesting(
|
| @@ -564,6 +567,7 @@ void WebSocketChannel::SendAddChannelRequestWithSuppliedCreator(
|
| const GURL& socket_url,
|
| const std::vector<std::string>& requested_subprotocols,
|
| const url::Origin& origin,
|
| + const std::string& additional_headers,
|
| const WebSocketStreamCreator& creator) {
|
| DCHECK_EQ(FRESHLY_CONSTRUCTED, state_);
|
| if (!socket_url.SchemeIsWSOrWSS()) {
|
| @@ -577,8 +581,8 @@ void WebSocketChannel::SendAddChannelRequestWithSuppliedCreator(
|
| std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate(
|
| new ConnectDelegate(this));
|
| stream_request_ = creator.Run(socket_url_, requested_subprotocols, origin,
|
| - url_request_context_, BoundNetLog(),
|
| - std::move(connect_delegate));
|
| + additional_headers, url_request_context_,
|
| + BoundNetLog(), std::move(connect_delegate));
|
| SetState(CONNECTING);
|
| }
|
|
|
|
|