Index: net/dns/dns_client.h |
diff --git a/net/dns/dns_client.h b/net/dns/dns_client.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d5e0cc3e0f86c5b34f86384bef85900cfd10c623 |
--- /dev/null |
+++ b/net/dns/dns_client.h |
@@ -0,0 +1,37 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef NET_DNS_DNS_CLIENT_H_ |
+#define NET_DNS_DNS_CLIENT_H_ |
+#pragma once |
+ |
+#include "base/memory/scoped_ptr.h" |
+#include "net/base/net_export.h" |
+ |
+namespace net { |
+ |
+class DnsConfig; |
+class DnsTransactionFactory; |
+class NetLog; |
+ |
+// Convenience wrapper allows easy injection of DnsTransaction into |
+// HostResolverImpl. |
+class NET_EXPORT DnsClient { |
+ public: |
+ virtual ~DnsClient() {} |
+ |
+ virtual void SetConfig(const DnsConfig& config) = 0; |
+ |
+ virtual const DnsConfig* GetConfig() const = 0; |
mmenke
2012/03/12 16:23:31
Should mention this returns NULL for invalid confi
|
+ |
+ virtual DnsTransactionFactory* GetTransactionFactory() = 0; |
+ |
+ // Creates default client. |
+ static scoped_ptr<DnsClient> CreateClient(NetLog* net_log); |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_DNS_DNS_CLIENT_H_ |
+ |