| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 return false; | 437 return false; |
| 438 | 438 |
| 439 return state_.connection()->socket()->GetPeerAddress(endpoint) == OK; | 439 return state_.connection()->socket()->GetPeerAddress(endpoint) == OK; |
| 440 } | 440 } |
| 441 | 441 |
| 442 void WebSocketBasicHandshakeStream::PopulateNetErrorDetails( | 442 void WebSocketBasicHandshakeStream::PopulateNetErrorDetails( |
| 443 NetErrorDetails* /*details*/) { | 443 NetErrorDetails* /*details*/) { |
| 444 return; | 444 return; |
| 445 } | 445 } |
| 446 | 446 |
| 447 Error WebSocketBasicHandshakeStream::GetSignedEKMForTokenBinding( |
| 448 crypto::ECPrivateKey* key, |
| 449 std::vector<uint8_t>* out) { |
| 450 NOTREACHED(); |
| 451 return ERR_NOT_IMPLEMENTED; |
| 452 } |
| 453 |
| 447 void WebSocketBasicHandshakeStream::Drain(HttpNetworkSession* session) { | 454 void WebSocketBasicHandshakeStream::Drain(HttpNetworkSession* session) { |
| 448 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this); | 455 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this); |
| 449 drainer->Start(session); | 456 drainer->Start(session); |
| 450 // |drainer| will delete itself. | 457 // |drainer| will delete itself. |
| 451 } | 458 } |
| 452 | 459 |
| 453 void WebSocketBasicHandshakeStream::SetPriority(RequestPriority priority) { | 460 void WebSocketBasicHandshakeStream::SetPriority(RequestPriority priority) { |
| 454 // TODO(ricea): See TODO comment in HttpBasicStream::SetPriority(). If it is | 461 // TODO(ricea): See TODO comment in HttpBasicStream::SetPriority(). If it is |
| 455 // gone, then copy whatever has happened there over here. | 462 // gone, then copy whatever has happened there over here. |
| 456 } | 463 } |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 set_failure_message("Error during WebSocket handshake: " + failure_message); | 597 set_failure_message("Error during WebSocket handshake: " + failure_message); |
| 591 return ERR_INVALID_RESPONSE; | 598 return ERR_INVALID_RESPONSE; |
| 592 } | 599 } |
| 593 | 600 |
| 594 void WebSocketBasicHandshakeStream::set_failure_message( | 601 void WebSocketBasicHandshakeStream::set_failure_message( |
| 595 const std::string& failure_message) { | 602 const std::string& failure_message) { |
| 596 *failure_message_ = failure_message; | 603 *failure_message_ = failure_message; |
| 597 } | 604 } |
| 598 | 605 |
| 599 } // namespace net | 606 } // namespace net |
| OLD | NEW |