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