OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "remoting/jingle_glue/ssl_socket_adapter.h" | 5 #include "remoting/jingle_glue/ssl_socket_adapter.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "jingle/glue/utils.h" | 10 #include "jingle/glue/utils.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 bool TransportSocket::WasEverUsed() const { | 263 bool TransportSocket::WasEverUsed() const { |
264 // We don't use this in ClientSocketPools, so this should never be used. | 264 // We don't use this in ClientSocketPools, so this should never be used. |
265 NOTREACHED(); | 265 NOTREACHED(); |
266 return was_used_to_convey_data_; | 266 return was_used_to_convey_data_; |
267 } | 267 } |
268 | 268 |
269 bool TransportSocket::UsingTCPFastOpen() const { | 269 bool TransportSocket::UsingTCPFastOpen() const { |
270 return false; | 270 return false; |
271 } | 271 } |
272 | 272 |
| 273 int64 TransportSocket::NumBytesRead() const { |
| 274 NOTREACHED(); |
| 275 return -1; |
| 276 } |
| 277 |
| 278 int TransportSocket::GetConnectTimeMicros() const { |
| 279 NOTREACHED(); |
| 280 return -1; |
| 281 } |
| 282 |
273 int TransportSocket::Read(net::IOBuffer* buf, int buf_len, | 283 int TransportSocket::Read(net::IOBuffer* buf, int buf_len, |
274 net::CompletionCallback* callback) { | 284 net::CompletionCallback* callback) { |
275 DCHECK(buf); | 285 DCHECK(buf); |
276 DCHECK(!read_callback_); | 286 DCHECK(!read_callback_); |
277 DCHECK(!read_buffer_.get()); | 287 DCHECK(!read_buffer_.get()); |
278 int result = socket_->Recv(buf->data(), buf_len); | 288 int result = socket_->Recv(buf->data(), buf_len); |
279 if (result < 0) { | 289 if (result < 0) { |
280 result = net::MapSystemError(socket_->GetError()); | 290 result = net::MapSystemError(socket_->GetError()); |
281 if (result == net::ERR_IO_PENDING) { | 291 if (result == net::ERR_IO_PENDING) { |
282 read_callback_ = callback; | 292 read_callback_ = callback; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 write_buffer_len_ = buffer_len; | 374 write_buffer_len_ = buffer_len; |
365 return; | 375 return; |
366 } | 376 } |
367 } | 377 } |
368 was_used_to_convey_data_ = true; | 378 was_used_to_convey_data_ = true; |
369 callback->RunWithParams(Tuple1<int>(result)); | 379 callback->RunWithParams(Tuple1<int>(result)); |
370 } | 380 } |
371 } | 381 } |
372 | 382 |
373 } // namespace remoting | 383 } // namespace remoting |
OLD | NEW |