Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Side by Side Diff: remoting/jingle_glue/ssl_socket_adapter.cc

Issue 6990036: Deciding best connection to schedule requests on based on cwnd and idle time (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: addressing comments Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 LOG(ERROR) << "Should not be called";
willchan no longer on Chromium 2011/06/14 12:01:22 Don't do LOG(ERROR) AND NOTREACHED(). If you want
Gagan 2011/06/14 18:25:02 im going to remove the log(error)
313 NOTREACHED();
314 return -1;
315 }
316
317 int TransportSocket::GetConnectTimeMicros() const {
318 LOG(ERROR) << "Should not be called";
319 NOTREACHED();
320 return -1;
321 }
322
311 int TransportSocket::Read(net::IOBuffer* buf, int buf_len, 323 int TransportSocket::Read(net::IOBuffer* buf, int buf_len,
312 net::CompletionCallback* callback) { 324 net::CompletionCallback* callback) {
313 DCHECK(buf); 325 DCHECK(buf);
314 DCHECK(!read_callback_); 326 DCHECK(!read_callback_);
315 DCHECK(!read_buffer_.get()); 327 DCHECK(!read_buffer_.get());
316 int result = socket_->Recv(buf->data(), buf_len); 328 int result = socket_->Recv(buf->data(), buf_len);
317 if (result < 0) { 329 if (result < 0) {
318 result = net::MapSystemError(socket_->GetError()); 330 result = net::MapSystemError(socket_->GetError());
319 if (result == net::ERR_IO_PENDING) { 331 if (result == net::ERR_IO_PENDING) {
320 read_callback_ = callback; 332 read_callback_ = callback;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 write_buffer_len_ = buffer_len; 414 write_buffer_len_ = buffer_len;
403 return; 415 return;
404 } 416 }
405 } 417 }
406 was_used_to_convey_data_ = true; 418 was_used_to_convey_data_ = true;
407 callback->RunWithParams(Tuple1<int>(result)); 419 callback->RunWithParams(Tuple1<int>(result));
408 } 420 }
409 } 421 }
410 422
411 } // namespace remoting 423 } // namespace remoting
OLDNEW
« net/socket/client_socket_pool_base.cc ('K') | « remoting/jingle_glue/ssl_socket_adapter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698