| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/websockets/websocket_basic_handshake_stream.h" | 5 #include "net/websockets/websocket_basic_handshake_stream.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <iterator> | 9 #include <iterator> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 } // namespace | 289 } // namespace |
| 290 | 290 |
| 291 WebSocketBasicHandshakeStream::WebSocketBasicHandshakeStream( | 291 WebSocketBasicHandshakeStream::WebSocketBasicHandshakeStream( |
| 292 std::unique_ptr<ClientSocketHandle> connection, | 292 std::unique_ptr<ClientSocketHandle> connection, |
| 293 WebSocketStream::ConnectDelegate* connect_delegate, | 293 WebSocketStream::ConnectDelegate* connect_delegate, |
| 294 bool using_proxy, | 294 bool using_proxy, |
| 295 std::vector<std::string> requested_sub_protocols, | 295 std::vector<std::string> requested_sub_protocols, |
| 296 std::vector<std::string> requested_extensions, | 296 std::vector<std::string> requested_extensions, |
| 297 WebSocketStreamRequest* request) | 297 WebSocketStreamRequest* request) |
| 298 : state_(std::move(connection), using_proxy), | 298 : state_(std::move(connection), |
| 299 using_proxy, |
| 300 false /* http_09_on_non_default_ports_enabled */), |
| 299 connect_delegate_(connect_delegate), | 301 connect_delegate_(connect_delegate), |
| 300 http_response_info_(nullptr), | 302 http_response_info_(nullptr), |
| 301 requested_sub_protocols_(requested_sub_protocols), | 303 requested_sub_protocols_(requested_sub_protocols), |
| 302 requested_extensions_(requested_extensions), | 304 requested_extensions_(requested_extensions), |
| 303 stream_request_(request) { | 305 stream_request_(request) { |
| 304 DCHECK(connect_delegate); | 306 DCHECK(connect_delegate); |
| 305 DCHECK(request); | 307 DCHECK(request); |
| 306 } | 308 } |
| 307 | 309 |
| 308 WebSocketBasicHandshakeStream::~WebSocketBasicHandshakeStream() {} | 310 WebSocketBasicHandshakeStream::~WebSocketBasicHandshakeStream() {} |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 } | 595 } |
| 594 OnFailure("Error during WebSocket handshake: " + failure_message); | 596 OnFailure("Error during WebSocket handshake: " + failure_message); |
| 595 return ERR_INVALID_RESPONSE; | 597 return ERR_INVALID_RESPONSE; |
| 596 } | 598 } |
| 597 | 599 |
| 598 void WebSocketBasicHandshakeStream::OnFailure(const std::string& message) { | 600 void WebSocketBasicHandshakeStream::OnFailure(const std::string& message) { |
| 599 stream_request_->OnFailure(message); | 601 stream_request_->OnFailure(message); |
| 600 } | 602 } |
| 601 | 603 |
| 602 } // namespace net | 604 } // namespace net |
| OLD | NEW |