| 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 "jingle/glue/fake_ssl_client_socket.h" | 5 #include "jingle/glue/fake_ssl_client_socket.h" |
| 6 | 6 |
| 7 #include <cstdlib> | 7 #include <cstdlib> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 return transport_socket_->Read(buf, buf_len, callback); | 96 return transport_socket_->Read(buf, buf_len, callback); |
| 97 } | 97 } |
| 98 | 98 |
| 99 int FakeSSLClientSocket::Write(net::IOBuffer* buf, int buf_len, | 99 int FakeSSLClientSocket::Write(net::IOBuffer* buf, int buf_len, |
| 100 const net::CompletionCallback& callback) { | 100 const net::CompletionCallback& callback) { |
| 101 DCHECK_EQ(next_handshake_state_, STATE_NONE); | 101 DCHECK_EQ(next_handshake_state_, STATE_NONE); |
| 102 DCHECK(handshake_completed_); | 102 DCHECK(handshake_completed_); |
| 103 return transport_socket_->Write(buf, buf_len, callback); | 103 return transport_socket_->Write(buf, buf_len, callback); |
| 104 } | 104 } |
| 105 | 105 |
| 106 bool FakeSSLClientSocket::SetReceiveBufferSize(int32 size) { | 106 int FakeSSLClientSocket::SetReceiveBufferSize(int32 size) { |
| 107 return transport_socket_->SetReceiveBufferSize(size); | 107 return transport_socket_->SetReceiveBufferSize(size); |
| 108 } | 108 } |
| 109 | 109 |
| 110 bool FakeSSLClientSocket::SetSendBufferSize(int32 size) { | 110 int FakeSSLClientSocket::SetSendBufferSize(int32 size) { |
| 111 return transport_socket_->SetSendBufferSize(size); | 111 return transport_socket_->SetSendBufferSize(size); |
| 112 } | 112 } |
| 113 | 113 |
| 114 int FakeSSLClientSocket::Connect(const net::CompletionCallback& callback) { | 114 int FakeSSLClientSocket::Connect(const net::CompletionCallback& callback) { |
| 115 // We don't support synchronous operation, even if | 115 // We don't support synchronous operation, even if |
| 116 // |transport_socket_| does. | 116 // |transport_socket_| does. |
| 117 DCHECK(!callback.is_null()); | 117 DCHECK(!callback.is_null()); |
| 118 DCHECK_EQ(next_handshake_state_, STATE_NONE); | 118 DCHECK_EQ(next_handshake_state_, STATE_NONE); |
| 119 DCHECK(!handshake_completed_); | 119 DCHECK(!handshake_completed_); |
| 120 DCHECK(user_connect_callback_.is_null()); | 120 DCHECK(user_connect_callback_.is_null()); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 338 |
| 339 net::NextProto FakeSSLClientSocket::GetNegotiatedProtocol() const { | 339 net::NextProto FakeSSLClientSocket::GetNegotiatedProtocol() const { |
| 340 return transport_socket_->GetNegotiatedProtocol(); | 340 return transport_socket_->GetNegotiatedProtocol(); |
| 341 } | 341 } |
| 342 | 342 |
| 343 bool FakeSSLClientSocket::GetSSLInfo(net::SSLInfo* ssl_info) { | 343 bool FakeSSLClientSocket::GetSSLInfo(net::SSLInfo* ssl_info) { |
| 344 return transport_socket_->GetSSLInfo(ssl_info); | 344 return transport_socket_->GetSSLInfo(ssl_info); |
| 345 } | 345 } |
| 346 | 346 |
| 347 } // namespace jingle_glue | 347 } // namespace jingle_glue |
| OLD | NEW |