| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <winsock2.h> | 10 #include <winsock2.h> |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 int Connect(const CompletionCallback& callback) override; | 109 int Connect(const CompletionCallback& callback) override; |
| 110 void Disconnect() override; | 110 void Disconnect() override; |
| 111 bool IsConnected() const override; | 111 bool IsConnected() const override; |
| 112 bool IsConnectedAndIdle() const override; | 112 bool IsConnectedAndIdle() const override; |
| 113 int GetPeerAddress(IPEndPoint* address) const override; | 113 int GetPeerAddress(IPEndPoint* address) const override; |
| 114 int GetLocalAddress(IPEndPoint* address) const override; | 114 int GetLocalAddress(IPEndPoint* address) const override; |
| 115 const BoundNetLog& NetLog() const override; | 115 const BoundNetLog& NetLog() const override; |
| 116 void SetSubresourceSpeculation() override; | 116 void SetSubresourceSpeculation() override; |
| 117 void SetOmniboxSpeculation() override; | 117 void SetOmniboxSpeculation() override; |
| 118 bool WasEverUsed() const override; | 118 bool WasEverUsed() const override; |
| 119 bool UsingTCPFastOpen() const override; | |
| 120 bool WasNpnNegotiated() const override; | 119 bool WasNpnNegotiated() const override; |
| 121 NextProto GetNegotiatedProtocol() const override; | 120 NextProto GetNegotiatedProtocol() const override; |
| 122 bool GetSSLInfo(SSLInfo* ssl_info) override; | 121 bool GetSSLInfo(SSLInfo* ssl_info) override; |
| 123 void GetConnectionAttempts(ConnectionAttempts* out) const override; | 122 void GetConnectionAttempts(ConnectionAttempts* out) const override; |
| 124 void ClearConnectionAttempts() override {} | 123 void ClearConnectionAttempts() override {} |
| 125 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {} | 124 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {} |
| 126 int64_t GetTotalReceivedBytes() const override; | 125 int64_t GetTotalReceivedBytes() const override; |
| 127 | 126 |
| 128 private: | 127 private: |
| 129 enum State { | 128 enum State { |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 } | 378 } |
| 380 | 379 |
| 381 void SSLServerSocketNSS::SetOmniboxSpeculation() { | 380 void SSLServerSocketNSS::SetOmniboxSpeculation() { |
| 382 transport_socket_->SetOmniboxSpeculation(); | 381 transport_socket_->SetOmniboxSpeculation(); |
| 383 } | 382 } |
| 384 | 383 |
| 385 bool SSLServerSocketNSS::WasEverUsed() const { | 384 bool SSLServerSocketNSS::WasEverUsed() const { |
| 386 return transport_socket_->WasEverUsed(); | 385 return transport_socket_->WasEverUsed(); |
| 387 } | 386 } |
| 388 | 387 |
| 389 bool SSLServerSocketNSS::UsingTCPFastOpen() const { | |
| 390 return transport_socket_->UsingTCPFastOpen(); | |
| 391 } | |
| 392 | |
| 393 bool SSLServerSocketNSS::WasNpnNegotiated() const { | 388 bool SSLServerSocketNSS::WasNpnNegotiated() const { |
| 394 NOTIMPLEMENTED(); | 389 NOTIMPLEMENTED(); |
| 395 return false; | 390 return false; |
| 396 } | 391 } |
| 397 | 392 |
| 398 NextProto SSLServerSocketNSS::GetNegotiatedProtocol() const { | 393 NextProto SSLServerSocketNSS::GetNegotiatedProtocol() const { |
| 399 // NPN is not supported by this class. | 394 // NPN is not supported by this class. |
| 400 return kProtoUnknown; | 395 return kProtoUnknown; |
| 401 } | 396 } |
| 402 | 397 |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 | 973 |
| 979 return scoped_ptr<SSLServerSocket>(new SSLServerSocketNSS( | 974 return scoped_ptr<SSLServerSocket>(new SSLServerSocketNSS( |
| 980 std::move(socket), cert_.get(), *key_, ssl_server_config_)); | 975 std::move(socket), cert_.get(), *key_, ssl_server_config_)); |
| 981 } | 976 } |
| 982 | 977 |
| 983 void EnableSSLServerSockets() { | 978 void EnableSSLServerSockets() { |
| 984 g_nss_ssl_server_init_singleton.Get(); | 979 g_nss_ssl_server_init_singleton.Get(); |
| 985 } | 980 } |
| 986 | 981 |
| 987 } // namespace net | 982 } // namespace net |
| OLD | NEW |