| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/spdy/spdy_proxy_client_socket.h" | 5 #include "net/spdy/spdy_proxy_client_socket.h" |
| 6 | 6 |
| 7 #include <algorithm> // min | 7 #include <algorithm> // min |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 return true; | 397 return true; |
| 398 } | 398 } |
| 399 | 399 |
| 400 int SpdyProxyClientSocket::OnSendBody() { | 400 int SpdyProxyClientSocket::OnSendBody() { |
| 401 // Because we use |spdy_stream_| via STATE_OPEN (ala WebSockets) | 401 // Because we use |spdy_stream_| via STATE_OPEN (ala WebSockets) |
| 402 // OnSendBody() should never be called. | 402 // OnSendBody() should never be called. |
| 403 NOTREACHED(); | 403 NOTREACHED(); |
| 404 return ERR_UNEXPECTED; | 404 return ERR_UNEXPECTED; |
| 405 } | 405 } |
| 406 | 406 |
| 407 bool SpdyProxyClientSocket::OnSendBodyComplete(int status) { | 407 bool SpdyProxyClientSocket::OnSendBodyComplete(int* status) { |
| 408 // Because we use |spdy_stream_| via STATE_OPEN (ala WebSockets) | 408 // Because we use |spdy_stream_| via STATE_OPEN (ala WebSockets) |
| 409 // OnSendBodyComplete() should never be called. | 409 // OnSendBodyComplete() should never be called. |
| 410 NOTREACHED(); | 410 NOTREACHED(); |
| 411 return false; | 411 return false; |
| 412 } | 412 } |
| 413 | 413 |
| 414 int SpdyProxyClientSocket::OnResponseReceived( | 414 int SpdyProxyClientSocket::OnResponseReceived( |
| 415 const spdy::SpdyHeaderBlock& response, | 415 const spdy::SpdyHeaderBlock& response, |
| 416 base::Time response_time, | 416 base::Time response_time, |
| 417 int status) { | 417 int status) { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 read_callback->Run(status); | 492 read_callback->Run(status); |
| 493 } else if (read_callback_) { | 493 } else if (read_callback_) { |
| 494 // If we have a read_callback, the we need to make sure we call it back | 494 // If we have a read_callback, the we need to make sure we call it back |
| 495 OnDataReceived(NULL, 0); | 495 OnDataReceived(NULL, 0); |
| 496 } | 496 } |
| 497 if (write_callback) | 497 if (write_callback) |
| 498 write_callback->Run(ERR_CONNECTION_CLOSED); | 498 write_callback->Run(ERR_CONNECTION_CLOSED); |
| 499 } | 499 } |
| 500 | 500 |
| 501 } // namespace net | 501 } // namespace net |
| OLD | NEW |