Index: net/websockets/websocket_channel.cc |
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc |
index 013b64a92ec8e53b80018ae767fb14474acf09f3..ba100ecea2a6e9e581322896132424008442e060 100644 |
--- a/net/websockets/websocket_channel.cc |
+++ b/net/websockets/websocket_channel.cc |
@@ -337,12 +337,11 @@ 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, |
+ socket_url, requested_subprotocols, origin, additional_headers, |
base::Bind(&WebSocketStream::CreateAndConnectStream)); |
} |
@@ -545,9 +544,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); |
+ SendAddChannelRequestWithSuppliedCreator(socket_url, requested_subprotocols, |
+ origin, additional_headers, creator); |
} |
void WebSocketChannel::SetClosingHandshakeTimeoutForTesting( |
@@ -564,6 +564,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 +578,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); |
} |