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

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: '' 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
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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 } 744 }
745 745
746 bool SSLClientSocketNSS::UsingTCPFastOpen() const { 746 bool SSLClientSocketNSS::UsingTCPFastOpen() const {
747 if (transport_.get() && transport_->socket()) { 747 if (transport_.get() && transport_->socket()) {
748 return transport_->socket()->UsingTCPFastOpen(); 748 return transport_->socket()->UsingTCPFastOpen();
749 } 749 }
750 NOTREACHED(); 750 NOTREACHED();
751 return false; 751 return false;
752 } 752 }
753 753
754 int SSLClientSocketNSS::NumBytesRead() const {
755 if (transport_.get() && transport_->socket()) {
756 return transport_->socket()->NumBytesRead();
757 }
758 NOTREACHED();
759 return -1;
760 }
761
762 double SSLClientSocketNSS::GetRTTInMs() const {
763 if (transport_.get() && transport_->socket()) {
764 return transport_->socket()->GetRTTInMs();
765 }
766 NOTREACHED();
767 return -1;
768 }
769
754 int SSLClientSocketNSS::Read(IOBuffer* buf, int buf_len, 770 int SSLClientSocketNSS::Read(IOBuffer* buf, int buf_len,
755 CompletionCallback* callback) { 771 CompletionCallback* callback) {
756 EnterFunction(buf_len); 772 EnterFunction(buf_len);
757 DCHECK(completed_handshake_); 773 DCHECK(completed_handshake_);
758 DCHECK(next_handshake_state_ == STATE_NONE); 774 DCHECK(next_handshake_state_ == STATE_NONE);
759 DCHECK(!user_read_callback_); 775 DCHECK(!user_read_callback_);
760 DCHECK(!user_connect_callback_); 776 DCHECK(!user_connect_callback_);
761 DCHECK(!user_read_buf_); 777 DCHECK(!user_read_buf_);
762 DCHECK(nss_bufs_); 778 DCHECK(nss_bufs_);
763 779
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after
2264 valid_thread_id_ = base::PlatformThread::CurrentId(); 2280 valid_thread_id_ = base::PlatformThread::CurrentId();
2265 } 2281 }
2266 2282
2267 bool SSLClientSocketNSS::CalledOnValidThread() const { 2283 bool SSLClientSocketNSS::CalledOnValidThread() const {
2268 EnsureThreadIdAssigned(); 2284 EnsureThreadIdAssigned();
2269 base::AutoLock auto_lock(lock_); 2285 base::AutoLock auto_lock(lock_);
2270 return valid_thread_id_ == base::PlatformThread::CurrentId(); 2286 return valid_thread_id_ == base::PlatformThread::CurrentId();
2271 } 2287 }
2272 2288
2273 } // namespace net 2289 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698