| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <cstdlib> | 9 #include <cstdlib> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 } | 107 } |
| 108 | 108 |
| 109 int FakeSSLClientSocket::SetReceiveBufferSize(int32_t size) { | 109 int FakeSSLClientSocket::SetReceiveBufferSize(int32_t size) { |
| 110 return transport_socket_->SetReceiveBufferSize(size); | 110 return transport_socket_->SetReceiveBufferSize(size); |
| 111 } | 111 } |
| 112 | 112 |
| 113 int FakeSSLClientSocket::SetSendBufferSize(int32_t size) { | 113 int FakeSSLClientSocket::SetSendBufferSize(int32_t size) { |
| 114 return transport_socket_->SetSendBufferSize(size); | 114 return transport_socket_->SetSendBufferSize(size); |
| 115 } | 115 } |
| 116 | 116 |
| 117 int FakeSSLClientSocket::SetDoNotFragment(bool do_not_fragment) { |
| 118 return transport_socket_->SetDoNotFragment(do_not_fragment); |
| 119 } |
| 120 |
| 117 int FakeSSLClientSocket::Connect(const net::CompletionCallback& callback) { | 121 int FakeSSLClientSocket::Connect(const net::CompletionCallback& callback) { |
| 118 // We don't support synchronous operation, even if | 122 // We don't support synchronous operation, even if |
| 119 // |transport_socket_| does. | 123 // |transport_socket_| does. |
| 120 DCHECK(!callback.is_null()); | 124 DCHECK(!callback.is_null()); |
| 121 DCHECK_EQ(next_handshake_state_, STATE_NONE); | 125 DCHECK_EQ(next_handshake_state_, STATE_NONE); |
| 122 DCHECK(!handshake_completed_); | 126 DCHECK(!handshake_completed_); |
| 123 DCHECK(user_connect_callback_.is_null()); | 127 DCHECK(user_connect_callback_.is_null()); |
| 124 DCHECK_EQ(write_buf_->BytesConsumed(), 0); | 128 DCHECK_EQ(write_buf_->BytesConsumed(), 0); |
| 125 DCHECK_EQ(read_buf_->BytesConsumed(), 0); | 129 DCHECK_EQ(read_buf_->BytesConsumed(), 0); |
| 126 | 130 |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 net::ConnectionAttempts* out) const { | 351 net::ConnectionAttempts* out) const { |
| 348 out->clear(); | 352 out->clear(); |
| 349 } | 353 } |
| 350 | 354 |
| 351 int64_t FakeSSLClientSocket::GetTotalReceivedBytes() const { | 355 int64_t FakeSSLClientSocket::GetTotalReceivedBytes() const { |
| 352 NOTIMPLEMENTED(); | 356 NOTIMPLEMENTED(); |
| 353 return 0; | 357 return 0; |
| 354 } | 358 } |
| 355 | 359 |
| 356 } // namespace jingle_glue | 360 } // namespace jingle_glue |
| OLD | NEW |