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

Side by Side Diff: net/socket/ssl_client_socket_openssl.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_openssl.h ('k') | net/socket/ssl_client_socket_win.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 // OpenSSL binding for SSLClientSocket. The class layout and general principle 5 // OpenSSL binding for SSLClientSocket. The class layout and general principle
6 // of operation is derived from SSLClientSocketNSS. 6 // of operation is derived from SSLClientSocketNSS.
7 7
8 #include "net/socket/ssl_client_socket_openssl.h" 8 #include "net/socket/ssl_client_socket_openssl.h"
9 9
10 #include <openssl/ssl.h> 10 #include <openssl/ssl.h>
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 } 624 }
625 625
626 bool SSLClientSocketOpenSSL::WasEverUsed() const { 626 bool SSLClientSocketOpenSSL::WasEverUsed() const {
627 if (transport_.get() && transport_->socket()) 627 if (transport_.get() && transport_->socket())
628 return transport_->socket()->WasEverUsed(); 628 return transport_->socket()->WasEverUsed();
629 629
630 NOTREACHED(); 630 NOTREACHED();
631 return false; 631 return false;
632 } 632 }
633 633
634 bool SSLClientSocketOpenSSL::UsingTCPFastOpen() const {
635 if (transport_.get() && transport_->socket())
636 return transport_->socket()->UsingTCPFastOpen();
637
638 NOTREACHED();
639 return false;
640 }
641
634 // Socket methods 642 // Socket methods
635 643
636 int SSLClientSocketOpenSSL::Read(IOBuffer* buf, 644 int SSLClientSocketOpenSSL::Read(IOBuffer* buf,
637 int buf_len, 645 int buf_len,
638 CompletionCallback* callback) { 646 CompletionCallback* callback) {
639 user_read_buf_ = buf; 647 user_read_buf_ = buf;
640 user_read_buf_len_ = buf_len; 648 user_read_buf_len_ = buf_len;
641 649
642 int rv = DoReadLoop(OK); 650 int rv = DoReadLoop(OK);
643 651
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 int rv = SSL_write(ssl_, user_write_buf_->data(), user_write_buf_len_); 731 int rv = SSL_write(ssl_, user_write_buf_->data(), user_write_buf_len_);
724 732
725 if (rv >= 0) 733 if (rv >= 0)
726 return rv; 734 return rv;
727 735
728 int err = SSL_get_error(ssl_, rv); 736 int err = SSL_get_error(ssl_, rv);
729 return MapOpenSSLError(err); 737 return MapOpenSSLError(err);
730 } 738 }
731 739
732 } // namespace net 740 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_openssl.h ('k') | net/socket/ssl_client_socket_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698