| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // stream may not be reused and a new SpdyProxyClientSocket must be | 70 // stream may not be reused and a new SpdyProxyClientSocket must be |
| 71 // created (possibly on top of the same SPDY Session). | 71 // created (possibly on top of the same SPDY Session). |
| 72 next_state_ = STATE_DISCONNECTED; | 72 next_state_ = STATE_DISCONNECTED; |
| 73 return OK; | 73 return OK; |
| 74 } | 74 } |
| 75 | 75 |
| 76 bool SpdyProxyClientSocket::IsUsingSpdy() const { | 76 bool SpdyProxyClientSocket::IsUsingSpdy() const { |
| 77 return true; | 77 return true; |
| 78 } | 78 } |
| 79 | 79 |
| 80 SSLClientSocket::NextProto | 80 NextProto SpdyProxyClientSocket::GetProtocolNegotiated() const { |
| 81 SpdyProxyClientSocket::GetProtocolNegotiated() const { | |
| 82 // Save the negotiated protocol | 81 // Save the negotiated protocol |
| 83 SSLInfo ssl_info; | 82 SSLInfo ssl_info; |
| 84 bool was_npn_negotiated; | 83 bool was_npn_negotiated; |
| 85 SSLClientSocket::NextProto protocol_negotiated; | 84 NextProto protocol_negotiated; |
| 86 spdy_stream_->GetSSLInfo(&ssl_info, &was_npn_negotiated, | 85 spdy_stream_->GetSSLInfo(&ssl_info, &was_npn_negotiated, |
| 87 &protocol_negotiated); | 86 &protocol_negotiated); |
| 88 return protocol_negotiated; | 87 return protocol_negotiated; |
| 89 } | 88 } |
| 90 | 89 |
| 91 HttpStream* SpdyProxyClientSocket::CreateConnectResponseStream() { | 90 HttpStream* SpdyProxyClientSocket::CreateConnectResponseStream() { |
| 92 DCHECK(response_stream_.get()); | 91 DCHECK(response_stream_.get()); |
| 93 return response_stream_.release(); | 92 return response_stream_.release(); |
| 94 } | 93 } |
| 95 | 94 |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 } | 543 } |
| 545 // This may have been deleted by read_callback_, so check first. | 544 // This may have been deleted by read_callback_, so check first. |
| 546 if (weak_ptr && !write_callback.is_null()) | 545 if (weak_ptr && !write_callback.is_null()) |
| 547 write_callback.Run(ERR_CONNECTION_CLOSED); | 546 write_callback.Run(ERR_CONNECTION_CLOSED); |
| 548 } | 547 } |
| 549 | 548 |
| 550 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { | 549 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { |
| 551 } | 550 } |
| 552 | 551 |
| 553 } // namespace net | 552 } // namespace net |
| OLD | NEW |