| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/fuzzed_socket_factory.h" | 5 #include "net/socket/fuzzed_socket_factory.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/test/fuzzed_data_provider.h" | 9 #include "base/test/fuzzed_data_provider.h" |
| 10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
| 11 #include "net/base/ip_endpoint.h" | 11 #include "net/base/ip_endpoint.h" |
| 12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
| 13 #include "net/base/network_change_notifier.h" | 13 #include "net/base/network_change_notifier.h" |
| 14 #include "net/log/net_log_with_source.h" | 14 #include "net/log/net_log_with_source.h" |
| 15 #include "net/socket/client_socket_handle.h" | 15 #include "net/socket/client_socket_handle.h" |
| 16 #include "net/socket/connection_attempts.h" | 16 #include "net/socket/connection_attempts.h" |
| 17 #include "net/socket/fuzzed_datagram_client_socket.h" |
| 17 #include "net/socket/fuzzed_socket.h" | 18 #include "net/socket/fuzzed_socket.h" |
| 18 #include "net/socket/ssl_client_socket.h" | 19 #include "net/socket/ssl_client_socket.h" |
| 19 #include "net/udp/fuzzed_datagram_client_socket.h" | |
| 20 | 20 |
| 21 namespace net { | 21 namespace net { |
| 22 | 22 |
| 23 class NetLog; | 23 class NetLog; |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 // SSLClientSocket implementation that always fails to connect. | 27 // SSLClientSocket implementation that always fails to connect. |
| 28 class FailingSSLClientSocket : public SSLClientSocket { | 28 class FailingSSLClientSocket : public SSLClientSocket { |
| 29 public: | 29 public: |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 std::unique_ptr<ClientSocketHandle> transport_socket, | 159 std::unique_ptr<ClientSocketHandle> transport_socket, |
| 160 const HostPortPair& host_and_port, | 160 const HostPortPair& host_and_port, |
| 161 const SSLConfig& ssl_config, | 161 const SSLConfig& ssl_config, |
| 162 const SSLClientSocketContext& context) { | 162 const SSLClientSocketContext& context) { |
| 163 return base::MakeUnique<FailingSSLClientSocket>(); | 163 return base::MakeUnique<FailingSSLClientSocket>(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 void FuzzedSocketFactory::ClearSSLSessionCache() {} | 166 void FuzzedSocketFactory::ClearSSLSessionCache() {} |
| 167 | 167 |
| 168 } // namespace net | 168 } // namespace net |
| OLD | NEW |