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

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

Issue 7251004: Deciding best connection to schedule requests on based on cwnd and idle time (Reopened after revert) (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Syncing to head Created 9 years, 5 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 "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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 } 724 }
725 725
726 bool SSLClientSocketWin::UsingTCPFastOpen() const { 726 bool SSLClientSocketWin::UsingTCPFastOpen() const {
727 if (transport_.get() && transport_->socket()) { 727 if (transport_.get() && transport_->socket()) {
728 return transport_->socket()->UsingTCPFastOpen(); 728 return transport_->socket()->UsingTCPFastOpen();
729 } 729 }
730 NOTREACHED(); 730 NOTREACHED();
731 return false; 731 return false;
732 } 732 }
733 733
734 int64 SSLClientSocketWin::NumBytesRead() const {
735 if (transport_.get() && transport_->socket()) {
736 return transport_->socket()->NumBytesRead();
737 }
738 NOTREACHED();
739 return -1;
740 }
741
742 base::TimeDelta SSLClientSocketWin::GetConnectTimeMicros() const {
743 if (transport_.get() && transport_->socket()) {
744 return transport_->socket()->GetConnectTimeMicros();
745 }
746 NOTREACHED();
747 return base::TimeDelta::FromMicroseconds(-1);
748 }
749
734 int SSLClientSocketWin::Read(IOBuffer* buf, int buf_len, 750 int SSLClientSocketWin::Read(IOBuffer* buf, int buf_len,
735 CompletionCallback* callback) { 751 CompletionCallback* callback) {
736 DCHECK(completed_handshake()); 752 DCHECK(completed_handshake());
737 DCHECK(!user_read_callback_); 753 DCHECK(!user_read_callback_);
738 754
739 // If we have surplus decrypted plaintext, satisfy the Read with it without 755 // If we have surplus decrypted plaintext, satisfy the Read with it without
740 // reading more ciphertext from the transport socket. 756 // reading more ciphertext from the transport socket.
741 if (bytes_decrypted_ != 0) { 757 if (bytes_decrypted_ != 0) {
742 int len = std::min(buf_len, bytes_decrypted_); 758 int len = std::min(buf_len, bytes_decrypted_);
743 net_log_.AddByteTransferEvent(NetLog::TYPE_SSL_SOCKET_BYTES_RECEIVED, len, 759 net_log_.AddByteTransferEvent(NetLog::TYPE_SSL_SOCKET_BYTES_RECEIVED, len,
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA); 1546 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA);
1531 } 1547 }
1532 1548
1533 void SSLClientSocketWin::FreeSendBuffer() { 1549 void SSLClientSocketWin::FreeSendBuffer() {
1534 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer); 1550 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer);
1535 DCHECK(status == SEC_E_OK); 1551 DCHECK(status == SEC_E_OK);
1536 memset(&send_buffer_, 0, sizeof(send_buffer_)); 1552 memset(&send_buffer_, 0, sizeof(send_buffer_));
1537 } 1553 }
1538 1554
1539 } // namespace net 1555 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698