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

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

Issue 6990036: Deciding best connection to schedule requests on based on cwnd and idle time (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Reuploading from google.com account 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_nss.h ('k') | net/socket/stream_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) 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 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived 5 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived
6 // from AuthCertificateCallback() in 6 // from AuthCertificateCallback() in
7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. 7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp.
8 8
9 /* ***** BEGIN LICENSE BLOCK ***** 9 /* ***** BEGIN LICENSE BLOCK *****
10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 } 709 }
710 710
711 bool SSLClientSocketNSS::UsingTCPFastOpen() const { 711 bool SSLClientSocketNSS::UsingTCPFastOpen() const {
712 if (transport_.get() && transport_->socket()) { 712 if (transport_.get() && transport_->socket()) {
713 return transport_->socket()->UsingTCPFastOpen(); 713 return transport_->socket()->UsingTCPFastOpen();
714 } 714 }
715 NOTREACHED(); 715 NOTREACHED();
716 return false; 716 return false;
717 } 717 }
718 718
719 int64 SSLClientSocketNSS::NumBytesRead() const {
720 if (transport_.get() && transport_->socket()) {
721 return transport_->socket()->NumBytesRead();
722 }
723 NOTREACHED();
724 return -1;
725 }
726
727 int SSLClientSocketNSS::GetConnectTimeMicros() const {
728 if (transport_.get() && transport_->socket()) {
729 return transport_->socket()->GetConnectTimeMicros();
730 }
731 NOTREACHED();
732 return -1;
733 }
734
719 int SSLClientSocketNSS::Read(IOBuffer* buf, int buf_len, 735 int SSLClientSocketNSS::Read(IOBuffer* buf, int buf_len,
720 CompletionCallback* callback) { 736 CompletionCallback* callback) {
721 EnterFunction(buf_len); 737 EnterFunction(buf_len);
722 DCHECK(completed_handshake_); 738 DCHECK(completed_handshake_);
723 DCHECK(next_handshake_state_ == STATE_NONE); 739 DCHECK(next_handshake_state_ == STATE_NONE);
724 DCHECK(!user_read_callback_); 740 DCHECK(!user_read_callback_);
725 DCHECK(!user_connect_callback_); 741 DCHECK(!user_connect_callback_);
726 DCHECK(!user_read_buf_); 742 DCHECK(!user_read_buf_);
727 DCHECK(nss_bufs_); 743 DCHECK(nss_bufs_);
728 744
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
2182 valid_thread_id_ = base::PlatformThread::CurrentId(); 2198 valid_thread_id_ = base::PlatformThread::CurrentId();
2183 } 2199 }
2184 2200
2185 bool SSLClientSocketNSS::CalledOnValidThread() const { 2201 bool SSLClientSocketNSS::CalledOnValidThread() const {
2186 EnsureThreadIdAssigned(); 2202 EnsureThreadIdAssigned();
2187 base::AutoLock auto_lock(lock_); 2203 base::AutoLock auto_lock(lock_);
2188 return valid_thread_id_ == base::PlatformThread::CurrentId(); 2204 return valid_thread_id_ == base::PlatformThread::CurrentId();
2189 } 2205 }
2190 2206
2191 } // namespace net 2207 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_nss.h ('k') | net/socket/stream_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698