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 int SpdyProxyClientSocket::OnSendBodyComplete(int /*status*/, bool* /*eof*/) { |
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 ERR_UNEXPECTED; |
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) { |
418 // If we've already received the reply, existing headers are too late. | 418 // If we've already received the reply, existing headers are too late. |
419 // TODO(mbelshe): figure out a way to make HEADERS frames useful after the | 419 // TODO(mbelshe): figure out a way to make HEADERS frames useful after the |
420 // initial response. | 420 // initial response. |
421 if (next_state_ != STATE_READ_REPLY_COMPLETE) | 421 if (next_state_ != STATE_READ_REPLY_COMPLETE) |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
491 read_callback_ = NULL; | 491 read_callback_ = NULL; |
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 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { | |
502 NOTREACHED(); | |
Satish
2011/03/03 23:57:06
Looks like adding this was incorrect as SpdyStream
willchan no longer on Chromium
2011/03/04 00:02:55
OK
| |
503 } | |
504 | |
501 } // namespace net | 505 } // namespace net |
OLD | NEW |