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

Side by Side Diff: net/socket/ssl_client_socket_win.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_win.h ('k') | net/socket/tcp_client_socket.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_win.h" 5 #include "net/socket/ssl_client_socket_win.h"
6 6
7 #include <schnlsp.h> 7 #include <schnlsp.h>
8 #include <map> 8 #include <map>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 } 699 }
700 700
701 bool SSLClientSocketWin::WasEverUsed() const { 701 bool SSLClientSocketWin::WasEverUsed() const {
702 if (transport_.get() && transport_->socket()) { 702 if (transport_.get() && transport_->socket()) {
703 return transport_->socket()->WasEverUsed(); 703 return transport_->socket()->WasEverUsed();
704 } 704 }
705 NOTREACHED(); 705 NOTREACHED();
706 return false; 706 return false;
707 } 707 }
708 708
709 bool SSLClientSocketWin::UsingTCPFastOpen() const {
710 if (transport_.get() && transport_->socket()) {
711 return transport_->socket()->UsingTCPFastOpen();
712 }
713 NOTREACHED();
714 return false;
715 }
716
709 int SSLClientSocketWin::Read(IOBuffer* buf, int buf_len, 717 int SSLClientSocketWin::Read(IOBuffer* buf, int buf_len,
710 CompletionCallback* callback) { 718 CompletionCallback* callback) {
711 DCHECK(completed_handshake()); 719 DCHECK(completed_handshake());
712 DCHECK(!user_read_callback_); 720 DCHECK(!user_read_callback_);
713 721
714 // If we have surplus decrypted plaintext, satisfy the Read with it without 722 // If we have surplus decrypted plaintext, satisfy the Read with it without
715 // reading more ciphertext from the transport socket. 723 // reading more ciphertext from the transport socket.
716 if (bytes_decrypted_ != 0) { 724 if (bytes_decrypted_ != 0) {
717 int len = std::min(buf_len, bytes_decrypted_); 725 int len = std::min(buf_len, bytes_decrypted_);
718 memcpy(buf->data(), decrypted_ptr_, len); 726 memcpy(buf->data(), decrypted_ptr_, len);
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA); 1506 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA);
1499 } 1507 }
1500 1508
1501 void SSLClientSocketWin::FreeSendBuffer() { 1509 void SSLClientSocketWin::FreeSendBuffer() {
1502 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer); 1510 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer);
1503 DCHECK(status == SEC_E_OK); 1511 DCHECK(status == SEC_E_OK);
1504 memset(&send_buffer_, 0, sizeof(send_buffer_)); 1512 memset(&send_buffer_, 0, sizeof(send_buffer_));
1505 } 1513 }
1506 1514
1507 } // namespace net 1515 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_win.h ('k') | net/socket/tcp_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698