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

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

Issue 7255002: Revert 90373 - Warmth of a connection (cwnd) is estimated by the amount of data written to the so... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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_win.h ('k') | net/socket/ssl_server_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')
Property Changes:
Added: svn:mergeinfo
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
750 int SSLClientSocketWin::Read(IOBuffer* buf, int buf_len, 734 int SSLClientSocketWin::Read(IOBuffer* buf, int buf_len,
751 CompletionCallback* callback) { 735 CompletionCallback* callback) {
752 DCHECK(completed_handshake()); 736 DCHECK(completed_handshake());
753 DCHECK(!user_read_callback_); 737 DCHECK(!user_read_callback_);
754 738
755 // If we have surplus decrypted plaintext, satisfy the Read with it without 739 // If we have surplus decrypted plaintext, satisfy the Read with it without
756 // reading more ciphertext from the transport socket. 740 // reading more ciphertext from the transport socket.
757 if (bytes_decrypted_ != 0) { 741 if (bytes_decrypted_ != 0) {
758 int len = std::min(buf_len, bytes_decrypted_); 742 int len = std::min(buf_len, bytes_decrypted_);
759 net_log_.AddByteTransferEvent(NetLog::TYPE_SSL_SOCKET_BYTES_RECEIVED, len, 743 net_log_.AddByteTransferEvent(NetLog::TYPE_SSL_SOCKET_BYTES_RECEIVED, len,
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA); 1530 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA);
1547 } 1531 }
1548 1532
1549 void SSLClientSocketWin::FreeSendBuffer() { 1533 void SSLClientSocketWin::FreeSendBuffer() {
1550 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer); 1534 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer);
1551 DCHECK(status == SEC_E_OK); 1535 DCHECK(status == SEC_E_OK);
1552 memset(&send_buffer_, 0, sizeof(send_buffer_)); 1536 memset(&send_buffer_, 0, sizeof(send_buffer_));
1553 } 1537 }
1554 1538
1555 } // namespace net 1539 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_win.h ('k') | net/socket/ssl_server_socket_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698