| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 bool TransportSocket::WasEverUsed() const { | 301 bool TransportSocket::WasEverUsed() const { |
| 302 // We don't use this in ClientSocketPools, so this should never be used. | 302 // We don't use this in ClientSocketPools, so this should never be used. |
| 303 NOTREACHED(); | 303 NOTREACHED(); |
| 304 return was_used_to_convey_data_; | 304 return was_used_to_convey_data_; |
| 305 } | 305 } |
| 306 | 306 |
| 307 bool TransportSocket::UsingTCPFastOpen() const { | 307 bool TransportSocket::UsingTCPFastOpen() const { |
| 308 return false; | 308 return false; |
| 309 } | 309 } |
| 310 | 310 |
| 311 int64 TransportSocket::NumBytesRead() const { |
| 312 NOTREACHED(); |
| 313 return -1; |
| 314 } |
| 315 |
| 316 int TransportSocket::GetConnectTimeMicros() const { |
| 317 NOTREACHED(); |
| 318 return -1; |
| 319 } |
| 320 |
| 311 int TransportSocket::Read(net::IOBuffer* buf, int buf_len, | 321 int TransportSocket::Read(net::IOBuffer* buf, int buf_len, |
| 312 net::CompletionCallback* callback) { | 322 net::CompletionCallback* callback) { |
| 313 DCHECK(buf); | 323 DCHECK(buf); |
| 314 DCHECK(!read_callback_); | 324 DCHECK(!read_callback_); |
| 315 DCHECK(!read_buffer_.get()); | 325 DCHECK(!read_buffer_.get()); |
| 316 int result = socket_->Recv(buf->data(), buf_len); | 326 int result = socket_->Recv(buf->data(), buf_len); |
| 317 if (result < 0) { | 327 if (result < 0) { |
| 318 result = net::MapSystemError(socket_->GetError()); | 328 result = net::MapSystemError(socket_->GetError()); |
| 319 if (result == net::ERR_IO_PENDING) { | 329 if (result == net::ERR_IO_PENDING) { |
| 320 read_callback_ = callback; | 330 read_callback_ = callback; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 write_buffer_len_ = buffer_len; | 412 write_buffer_len_ = buffer_len; |
| 403 return; | 413 return; |
| 404 } | 414 } |
| 405 } | 415 } |
| 406 was_used_to_convey_data_ = true; | 416 was_used_to_convey_data_ = true; |
| 407 callback->RunWithParams(Tuple1<int>(result)); | 417 callback->RunWithParams(Tuple1<int>(result)); |
| 408 } | 418 } |
| 409 } | 419 } |
| 410 | 420 |
| 411 } // namespace remoting | 421 } // namespace remoting |
| OLD | NEW |