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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 } | 101 } |
102 | 102 |
103 bool SpdyProxyClientSocket::IsConnected() const { | 103 bool SpdyProxyClientSocket::IsConnected() const { |
104 return next_state_ == STATE_OPEN || next_state_ == STATE_CLOSED; | 104 return next_state_ == STATE_OPEN || next_state_ == STATE_CLOSED; |
105 } | 105 } |
106 | 106 |
107 bool SpdyProxyClientSocket::IsConnectedAndIdle() const { | 107 bool SpdyProxyClientSocket::IsConnectedAndIdle() const { |
108 return IsConnected() && !spdy_stream_->is_idle(); | 108 return IsConnected() && !spdy_stream_->is_idle(); |
109 } | 109 } |
110 | 110 |
| 111 const BoundNetLog& SpdyProxyClientSocket::NetLog() const { |
| 112 return net_log_; |
| 113 } |
| 114 |
111 void SpdyProxyClientSocket::SetSubresourceSpeculation() { | 115 void SpdyProxyClientSocket::SetSubresourceSpeculation() { |
112 // TODO(rch): what should this implementation be? | 116 // TODO(rch): what should this implementation be? |
113 } | 117 } |
114 | 118 |
115 void SpdyProxyClientSocket::SetOmniboxSpeculation() { | 119 void SpdyProxyClientSocket::SetOmniboxSpeculation() { |
116 // TODO(rch): what should this implementation be? | 120 // TODO(rch): what should this implementation be? |
117 } | 121 } |
118 | 122 |
119 bool SpdyProxyClientSocket::WasEverUsed() const { | 123 bool SpdyProxyClientSocket::WasEverUsed() const { |
120 return was_ever_used_ || (spdy_stream_ && spdy_stream_->WasEverUsed()); | 124 return was_ever_used_ || (spdy_stream_ && spdy_stream_->WasEverUsed()); |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 read_callback->Run(status); | 471 read_callback->Run(status); |
468 } else if (read_callback_) { | 472 } else if (read_callback_) { |
469 // If we have a read_callback, the we need to make sure we call it back | 473 // If we have a read_callback, the we need to make sure we call it back |
470 OnDataReceived(NULL, 0); | 474 OnDataReceived(NULL, 0); |
471 } | 475 } |
472 if (write_callback) | 476 if (write_callback) |
473 write_callback->Run(ERR_CONNECTION_CLOSED); | 477 write_callback->Run(ERR_CONNECTION_CLOSED); |
474 } | 478 } |
475 | 479 |
476 } // namespace net | 480 } // namespace net |
OLD | NEW |