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

Side by Side Diff: net/socket/ssl_client_socket_mac.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: Reuploading from google.com account 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
« no previous file with comments | « net/socket/ssl_client_socket_mac.h ('k') | net/socket/ssl_client_socket_nss.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "net/socket/ssl_client_socket_mac.h" 5 #include "net/socket/ssl_client_socket_mac.h"
6 6
7 #include <CoreServices/CoreServices.h> 7 #include <CoreServices/CoreServices.h>
8 #include <netdb.h> 8 #include <netdb.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 } 651 }
652 652
653 bool SSLClientSocketMac::UsingTCPFastOpen() const { 653 bool SSLClientSocketMac::UsingTCPFastOpen() const {
654 if (transport_.get() && transport_->socket()) { 654 if (transport_.get() && transport_->socket()) {
655 return transport_->socket()->UsingTCPFastOpen(); 655 return transport_->socket()->UsingTCPFastOpen();
656 } 656 }
657 NOTREACHED(); 657 NOTREACHED();
658 return false; 658 return false;
659 } 659 }
660 660
661 int64 SSLClientSocketMac::NumBytesRead() const {
662 if (transport_.get() && transport_->socket()) {
663 return transport_->socket()->NumBytesRead();
664 }
665 NOTREACHED();
666 return -1;
667 }
668
669 int SSLClientSocketMac::GetConnectTimeMicros() const {
670 if (transport_.get() && transport_->socket()) {
671 return transport_->socket()->GetConnectTimeMicros();
672 }
673 NOTREACHED();
674 return -1;
675 }
676
661 int SSLClientSocketMac::Read(IOBuffer* buf, int buf_len, 677 int SSLClientSocketMac::Read(IOBuffer* buf, int buf_len,
662 CompletionCallback* callback) { 678 CompletionCallback* callback) {
663 DCHECK(completed_handshake()); 679 DCHECK(completed_handshake());
664 DCHECK(!user_read_callback_); 680 DCHECK(!user_read_callback_);
665 DCHECK(!user_read_buf_); 681 DCHECK(!user_read_buf_);
666 682
667 user_read_buf_ = buf; 683 user_read_buf_ = buf;
668 user_read_buf_len_ = buf_len; 684 user_read_buf_len_ = buf_len;
669 685
670 int rv = DoPayloadRead(); 686 int rv = DoPayloadRead();
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 if (rv < 0 && rv != ERR_IO_PENDING) { 1409 if (rv < 0 && rv != ERR_IO_PENDING) {
1394 us->write_io_buf_ = NULL; 1410 us->write_io_buf_ = NULL;
1395 return OSStatusFromNetError(rv); 1411 return OSStatusFromNetError(rv);
1396 } 1412 }
1397 1413
1398 // always lie to our caller 1414 // always lie to our caller
1399 return noErr; 1415 return noErr;
1400 } 1416 }
1401 1417
1402 } // namespace net 1418 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_mac.h ('k') | net/socket/ssl_client_socket_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698