OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 return ERR_UNEXPECTED; | 451 return ERR_UNEXPECTED; |
452 } | 452 } |
453 | 453 |
454 int SpdyProxyClientSocket::OnSendBodyComplete(int /*status*/, bool* /*eof*/) { | 454 int SpdyProxyClientSocket::OnSendBodyComplete(int /*status*/, bool* /*eof*/) { |
455 // Because we use |spdy_stream_| via STATE_OPEN (ala WebSockets) | 455 // Because we use |spdy_stream_| via STATE_OPEN (ala WebSockets) |
456 // OnSendBodyComplete() should never be called. | 456 // OnSendBodyComplete() should never be called. |
457 NOTREACHED(); | 457 NOTREACHED(); |
458 return ERR_UNEXPECTED; | 458 return ERR_UNEXPECTED; |
459 } | 459 } |
460 | 460 |
| 461 int SpdyProxyClientSocket::OnSendChunkedBody() { |
| 462 // Because we use |spdy_stream_| via STATE_OPEN (ala WebSockets) |
| 463 // OnSendChunkedBody() should never be called. |
| 464 NOTREACHED(); |
| 465 return ERR_UNEXPECTED; |
| 466 } |
| 467 |
| 468 int SpdyProxyClientSocket::OnSendChunkedBodyComplete(int /*status*/, |
| 469 bool* /*eof*/) { |
| 470 // Because we use |spdy_stream_| via STATE_OPEN (ala WebSockets) |
| 471 // OnSendChunkedBodyComplete() should never be called. |
| 472 NOTREACHED(); |
| 473 return ERR_UNEXPECTED; |
| 474 } |
| 475 |
461 int SpdyProxyClientSocket::OnResponseReceived( | 476 int SpdyProxyClientSocket::OnResponseReceived( |
462 const SpdyHeaderBlock& response, | 477 const SpdyHeaderBlock& response, |
463 base::Time response_time, | 478 base::Time response_time, |
464 int status) { | 479 int status) { |
465 // If we've already received the reply, existing headers are too late. | 480 // If we've already received the reply, existing headers are too late. |
466 // TODO(mbelshe): figure out a way to make HEADERS frames useful after the | 481 // TODO(mbelshe): figure out a way to make HEADERS frames useful after the |
467 // initial response. | 482 // initial response. |
468 if (next_state_ != STATE_READ_REPLY_COMPLETE) | 483 if (next_state_ != STATE_READ_REPLY_COMPLETE) |
469 return OK; | 484 return OK; |
470 | 485 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 OnDataReceived(NULL, 0); | 558 OnDataReceived(NULL, 0); |
544 } | 559 } |
545 // This may have been deleted by read_callback_, so check first. | 560 // This may have been deleted by read_callback_, so check first. |
546 if (weak_ptr && !write_callback.is_null()) | 561 if (weak_ptr && !write_callback.is_null()) |
547 write_callback.Run(ERR_CONNECTION_CLOSED); | 562 write_callback.Run(ERR_CONNECTION_CLOSED); |
548 } | 563 } |
549 | 564 |
550 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { | 565 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { |
551 } | 566 } |
552 | 567 |
| 568 bool SpdyProxyClientSocket::IsRequestBodyChunked() { |
| 569 return false; |
| 570 } |
| 571 |
553 } // namespace net | 572 } // namespace net |
OLD | NEW |