| Index: content/browser/renderer_host/websocket_host.cc
|
| diff --git a/content/browser/renderer_host/websocket_host.cc b/content/browser/renderer_host/websocket_host.cc
|
| index cce4485b3d4d67801e5037ee042d88fd5aaaaa41..d53cd69b03541a7228603099b5ae273d18a14066 100644
|
| --- a/content/browser/renderer_host/websocket_host.cc
|
| +++ b/content/browser/renderer_host/websocket_host.cc
|
| @@ -399,22 +399,26 @@ void WebSocketHost::OnAddChannelRequest(
|
| const GURL& socket_url,
|
| const std::vector<std::string>& requested_protocols,
|
| const url::Origin& origin,
|
| + const std::string& additional_headers,
|
| int render_frame_id) {
|
| DVLOG(3) << "WebSocketHost::OnAddChannelRequest"
|
| << " routing_id=" << routing_id_ << " socket_url=\"" << socket_url
|
| << "\" requested_protocols=\""
|
| << base::JoinString(requested_protocols, ", ") << "\" origin=\""
|
| - << origin << "\"";
|
| + << origin << "\" additional_headers=\"" << additional_headers
|
| + << "\"";
|
|
|
| DCHECK(!channel_);
|
| if (delay_ > base::TimeDelta()) {
|
| base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
|
| FROM_HERE,
|
| base::Bind(&WebSocketHost::AddChannel, weak_ptr_factory_.GetWeakPtr(),
|
| - socket_url, requested_protocols, origin, render_frame_id),
|
| + socket_url, requested_protocols, origin,
|
| + additional_headers, render_frame_id),
|
| delay_);
|
| } else {
|
| - AddChannel(socket_url, requested_protocols, origin, render_frame_id);
|
| + AddChannel(socket_url, requested_protocols, origin,
|
| + additional_headers, render_frame_id);
|
| }
|
| // |this| may have been deleted here.
|
| }
|
| @@ -423,12 +427,14 @@ void WebSocketHost::AddChannel(
|
| const GURL& socket_url,
|
| const std::vector<std::string>& requested_protocols,
|
| const url::Origin& origin,
|
| + const std::string& additional_headers,
|
| int render_frame_id) {
|
| DVLOG(3) << "WebSocketHost::AddChannel"
|
| << " routing_id=" << routing_id_ << " socket_url=\"" << socket_url
|
| << "\" requested_protocols=\""
|
| << base::JoinString(requested_protocols, ", ") << "\" origin=\""
|
| - << origin << "\"";
|
| + << origin << "\" additional_headers=\""
|
| + << additional_headers << "\"";
|
|
|
| DCHECK(!channel_);
|
|
|
| @@ -450,8 +456,9 @@ void WebSocketHost::AddChannel(
|
| pending_flow_control_quota_));
|
| pending_flow_control_quota_ = 0;
|
| }
|
| -
|
| - channel_->SendAddChannelRequest(socket_url, requested_protocols, origin);
|
| + channel_->SendAddChannelRequest(
|
| + socket_url, requested_protocols, origin,
|
| + additional_headers);
|
| // |this| may have been deleted here.
|
| }
|
|
|
|
|