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 #include "net/socket/ssl_server_socket_nss.h" | 5 #include "net/socket/ssl_server_socket_nss.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <winsock2.h> | 8 #include <winsock2.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 } | 219 } |
220 | 220 |
221 bool SSLServerSocketNSS::WasEverUsed() const { | 221 bool SSLServerSocketNSS::WasEverUsed() const { |
222 return transport_socket_->WasEverUsed(); | 222 return transport_socket_->WasEverUsed(); |
223 } | 223 } |
224 | 224 |
225 bool SSLServerSocketNSS::UsingTCPFastOpen() const { | 225 bool SSLServerSocketNSS::UsingTCPFastOpen() const { |
226 return transport_socket_->UsingTCPFastOpen(); | 226 return transport_socket_->UsingTCPFastOpen(); |
227 } | 227 } |
228 | 228 |
| 229 int64 SSLServerSocketNSS::NumBytesRead() const { |
| 230 return transport_socket_->NumBytesRead(); |
| 231 } |
| 232 |
| 233 int SSLServerSocketNSS::GetConnectTimeMicros() const { |
| 234 return transport_socket_->GetConnectTimeMicros(); |
| 235 } |
| 236 |
229 int SSLServerSocketNSS::InitializeSSLOptions() { | 237 int SSLServerSocketNSS::InitializeSSLOptions() { |
230 // Transport connected, now hook it up to nss | 238 // Transport connected, now hook it up to nss |
231 // TODO(port): specify rx and tx buffer sizes separately | 239 // TODO(port): specify rx and tx buffer sizes separately |
232 nss_fd_ = memio_CreateIOLayer(kRecvBufferSize); | 240 nss_fd_ = memio_CreateIOLayer(kRecvBufferSize); |
233 if (nss_fd_ == NULL) { | 241 if (nss_fd_ == NULL) { |
234 return ERR_OUT_OF_MEMORY; // TODO(port): map NSPR error code. | 242 return ERR_OUT_OF_MEMORY; // TODO(port): map NSPR error code. |
235 } | 243 } |
236 | 244 |
237 // Grab pointer to buffers | 245 // Grab pointer to buffers |
238 nss_bufs_ = memio_GetSecret(nss_fd_); | 246 nss_bufs_ = memio_GetSecret(nss_fd_); |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 // We must call EnsureOCSPInit() here, on the IO thread, to get the IO loop | 736 // We must call EnsureOCSPInit() here, on the IO thread, to get the IO loop |
729 // by MessageLoopForIO::current(). | 737 // by MessageLoopForIO::current(). |
730 // X509Certificate::Verify() runs on a worker thread of CertVerifier. | 738 // X509Certificate::Verify() runs on a worker thread of CertVerifier. |
731 EnsureOCSPInit(); | 739 EnsureOCSPInit(); |
732 #endif | 740 #endif |
733 | 741 |
734 return OK; | 742 return OK; |
735 } | 743 } |
736 | 744 |
737 } // namespace net | 745 } // namespace net |
OLD | NEW |