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

Side by Side Diff: net/socket/ssl_client_socket_mac.cc

Issue 4039003: Add experimental option for TCP FastOpen.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 } 603 }
604 604
605 bool SSLClientSocketMac::WasEverUsed() const { 605 bool SSLClientSocketMac::WasEverUsed() const {
606 if (transport_.get() && transport_->socket()) { 606 if (transport_.get() && transport_->socket()) {
607 return transport_->socket()->WasEverUsed(); 607 return transport_->socket()->WasEverUsed();
608 } 608 }
609 NOTREACHED(); 609 NOTREACHED();
610 return false; 610 return false;
611 } 611 }
612 612
613 bool SSLClientSocketMac::UsingTCPFastOpen() const {
614 if (transport_.get() && transport_->socket()) {
615 return transport_->socket()->UsingTCPFastOpen();
616 }
617 NOTREACHED();
618 return false;
619 }
620
613 int SSLClientSocketMac::Read(IOBuffer* buf, int buf_len, 621 int SSLClientSocketMac::Read(IOBuffer* buf, int buf_len,
614 CompletionCallback* callback) { 622 CompletionCallback* callback) {
615 DCHECK(completed_handshake()); 623 DCHECK(completed_handshake());
616 DCHECK(!user_read_callback_); 624 DCHECK(!user_read_callback_);
617 DCHECK(!user_read_buf_); 625 DCHECK(!user_read_buf_);
618 626
619 user_read_buf_ = buf; 627 user_read_buf_ = buf;
620 user_read_buf_len_ = buf_len; 628 user_read_buf_len_ = buf_len;
621 629
622 int rv = DoPayloadRead(); 630 int rv = DoPayloadRead();
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 if (rv < 0 && rv != ERR_IO_PENDING) { 1269 if (rv < 0 && rv != ERR_IO_PENDING) {
1262 us->write_io_buf_ = NULL; 1270 us->write_io_buf_ = NULL;
1263 return OSStatusFromNetError(rv); 1271 return OSStatusFromNetError(rv);
1264 } 1272 }
1265 1273
1266 // always lie to our caller 1274 // always lie to our caller
1267 return noErr; 1275 return noErr;
1268 } 1276 }
1269 1277
1270 } // namespace net 1278 } // 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