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 #ifndef NET_DNS_FUZZED_HOST_RESOLVER_ | 5 #ifndef NET_DNS_FUZZED_HOST_RESOLVER_ |
6 #define NET_DNS_FUZZED_HOST_RESOLVER_ | 6 #define NET_DNS_FUZZED_HOST_RESOLVER_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "net/base/address_family.h" | 14 #include "net/base/address_family.h" |
15 #include "net/dns/host_resolver.h" | 15 #include "net/dns/host_resolver.h" |
16 #include "net/dns/host_resolver_impl.h" | 16 #include "net/dns/host_resolver_impl.h" |
17 #include "net/socket/fuzzed_socket_factory.h" | 17 #include "net/socket/fuzzed_socket_factory.h" |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class FuzzedDataProvider; | 20 class FuzzedDataProvider; |
21 } | 21 } |
22 | 22 |
23 namespace net { | 23 namespace net { |
24 | 24 |
25 class AddressList; | 25 class AddressList; |
26 class ClientSocketFactory; | |
27 class DnsClient; | 26 class DnsClient; |
28 class NetLog; | 27 class NetLog; |
29 class ScopedDefaultHostResolverProc; | |
30 | 28 |
31 // HostResolver that uses a fuzzer to determine what results to return. It | 29 // HostResolver that uses a fuzzer to determine what results to return. It |
32 // inherits from HostResolverImpl, unlike MockHostResolver, so more closely | 30 // inherits from HostResolverImpl, unlike MockHostResolver, so more closely |
33 // matches real behavior. | 31 // matches real behavior. |
34 // | 32 // |
35 // By default uses a mocked out system resolver, though can be configured to | 33 // By default uses a mocked out system resolver, though can be configured to |
36 // use the built-in async resolver (Built in DNS stub resolver) with a fuzzed | 34 // use the built-in async resolver (Built in DNS stub resolver) with a fuzzed |
37 // set of UDP/TCP sockets. | 35 // set of UDP/TCP sockets. |
38 // | 36 // |
39 // To make behavior most deterministic, does not use the WorkerPool to run its | 37 // To make behavior most deterministic, does not use the WorkerPool to run its |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 NetLog* net_log_; | 72 NetLog* net_log_; |
75 | 73 |
76 base::WeakPtrFactory<base::FuzzedDataProvider> data_provider_weak_factory_; | 74 base::WeakPtrFactory<base::FuzzedDataProvider> data_provider_weak_factory_; |
77 | 75 |
78 DISALLOW_COPY_AND_ASSIGN(FuzzedHostResolver); | 76 DISALLOW_COPY_AND_ASSIGN(FuzzedHostResolver); |
79 }; | 77 }; |
80 | 78 |
81 } // namespace net | 79 } // namespace net |
82 | 80 |
83 #endif // NET_DNS_FUZZED_HOST_RESOLVER_ | 81 #endif // NET_DNS_FUZZED_HOST_RESOLVER_ |
OLD | NEW |