OLD | NEW |
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 Loading... |
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 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2173 valid_thread_id_ = base::PlatformThread::CurrentId(); | 2189 valid_thread_id_ = base::PlatformThread::CurrentId(); |
2174 } | 2190 } |
2175 | 2191 |
2176 bool SSLClientSocketNSS::CalledOnValidThread() const { | 2192 bool SSLClientSocketNSS::CalledOnValidThread() const { |
2177 EnsureThreadIdAssigned(); | 2193 EnsureThreadIdAssigned(); |
2178 base::AutoLock auto_lock(lock_); | 2194 base::AutoLock auto_lock(lock_); |
2179 return valid_thread_id_ == base::PlatformThread::CurrentId(); | 2195 return valid_thread_id_ == base::PlatformThread::CurrentId(); |
2180 } | 2196 } |
2181 | 2197 |
2182 } // namespace net | 2198 } // namespace net |
OLD | NEW |