| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 stream_request_(request) { | 305 stream_request_(request) { |
| 306 DCHECK(connect_delegate); | 306 DCHECK(connect_delegate); |
| 307 DCHECK(request); | 307 DCHECK(request); |
| 308 } | 308 } |
| 309 | 309 |
| 310 WebSocketBasicHandshakeStream::~WebSocketBasicHandshakeStream() {} | 310 WebSocketBasicHandshakeStream::~WebSocketBasicHandshakeStream() {} |
| 311 | 311 |
| 312 int WebSocketBasicHandshakeStream::InitializeStream( | 312 int WebSocketBasicHandshakeStream::InitializeStream( |
| 313 const HttpRequestInfo* request_info, | 313 const HttpRequestInfo* request_info, |
| 314 RequestPriority priority, | 314 RequestPriority priority, |
| 315 const BoundNetLog& net_log, | 315 const NetLogWithSource& net_log, |
| 316 const CompletionCallback& callback) { | 316 const CompletionCallback& callback) { |
| 317 url_ = request_info->url; | 317 url_ = request_info->url; |
| 318 state_.Initialize(request_info, priority, net_log, callback); | 318 state_.Initialize(request_info, priority, net_log, callback); |
| 319 return OK; | 319 return OK; |
| 320 } | 320 } |
| 321 | 321 |
| 322 int WebSocketBasicHandshakeStream::SendRequest( | 322 int WebSocketBasicHandshakeStream::SendRequest( |
| 323 const HttpRequestHeaders& headers, | 323 const HttpRequestHeaders& headers, |
| 324 HttpResponseInfo* response, | 324 HttpResponseInfo* response, |
| 325 const CompletionCallback& callback) { | 325 const CompletionCallback& callback) { |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 } | 592 } |
| 593 OnFailure("Error during WebSocket handshake: " + failure_message); | 593 OnFailure("Error during WebSocket handshake: " + failure_message); |
| 594 return ERR_INVALID_RESPONSE; | 594 return ERR_INVALID_RESPONSE; |
| 595 } | 595 } |
| 596 | 596 |
| 597 void WebSocketBasicHandshakeStream::OnFailure(const std::string& message) { | 597 void WebSocketBasicHandshakeStream::OnFailure(const std::string& message) { |
| 598 stream_request_->OnFailure(message); | 598 stream_request_->OnFailure(message); |
| 599 } | 599 } |
| 600 | 600 |
| 601 } // namespace net | 601 } // namespace net |
| OLD | NEW |