| Index: net/dns/dns_client.h
|
| diff --git a/net/dns/dns_client.h b/net/dns/dns_client.h
|
| index 01d024b9a17032b18d51c57177e74ae478f1177a..bb63aaa541190a1a298302ab2944ec3aaa7e5007 100644
|
| --- a/net/dns/dns_client.h
|
| +++ b/net/dns/dns_client.h
|
| @@ -8,10 +8,12 @@
|
| #include <memory>
|
|
|
| #include "net/base/net_export.h"
|
| +#include "net/base/rand_callback.h"
|
|
|
| namespace net {
|
|
|
| class AddressSorter;
|
| +class ClientSocketFactory;
|
| struct DnsConfig;
|
| class DnsTransactionFactory;
|
| class NetLog;
|
| @@ -38,6 +40,14 @@ class NET_EXPORT DnsClient {
|
|
|
| // Creates default client.
|
| static std::unique_ptr<DnsClient> CreateClient(NetLog* net_log);
|
| +
|
| + // Creates a client for testing. Allows using a mock ClientSocketFactory and
|
| + // a deterministic random number generator. |socket_factory| must outlive
|
| + // the returned DnsClient.
|
| + static std::unique_ptr<DnsClient> CreateClientForTesting(
|
| + NetLog* net_log,
|
| + ClientSocketFactory* socket_factory,
|
| + const RandIntCallback& rand_int_callback);
|
| };
|
|
|
| } // namespace net
|
|
|