Index: net/dns/host_resolver_mojo_host.h |
diff --git a/net/dns/host_resolver_mojo_host.h b/net/dns/host_resolver_mojo_host.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a65e6034b490e9c0dbdd5b19450bb89b513b7e34 |
--- /dev/null |
+++ b/net/dns/host_resolver_mojo_host.h |
@@ -0,0 +1,62 @@ |
+// 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_HOST_RESOLVER_MOJO_HOST_H_ |
+#define NET_DNS_HOST_RESOLVER_MOJO_HOST_H_ |
+ |
+#include <map> |
+ |
+#include "base/basictypes.h" |
+#include "base/gtest_prod_util.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "base/memory/scoped_vector.h" |
+#include "base/memory/weak_ptr.h" |
+#include "base/threading/non_thread_safe.h" |
+#include "base/time/time.h" |
+#include "net/base/net_export.h" |
+#include "net/base/network_change_notifier.h" |
+#include "net/dns/host_cache.h" |
+#include "net/dns/host_resolver.h" |
+#include "net/dns/host_resolver.mojom.h" |
+ |
+namespace net { |
+ |
+class BoundNetLog; |
+class DnsClient; |
+class NetLog; |
+ |
+class NET_EXPORT_PRIVATE HostResolverMojoHost |
+ : public mojo::InterfaceImpl<dns::Resolver>, |
+ NON_EXPORTED_BASE(public base::NonThreadSafe) { |
+ public: |
+ explicit HostResolverMojoHost(HostResolver* resolver); |
+ void Resolve(dns::RequestInfoPtr request_info, |
+ dns::ResolveRequestClientPtr client) override; |
+ |
+ private: |
+ class Job; |
+ |
+ HostResolver* resolver_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(HostResolverMojoHost); |
+}; |
+ |
+} // namespace net |
+ |
+namespace mojo { |
+ |
+template <> |
+struct TypeConverter<net::HostResolver::RequestInfo, net::dns::RequestInfo> { |
+ static net::HostResolver::RequestInfo Convert( |
+ const net::dns::RequestInfo& obj); |
+}; |
+ |
+template <> |
+struct TypeConverter<net::dns::AddressListPtr, net::AddressList> { |
+ static net::dns::AddressListPtr Convert(const net::AddressList& obj); |
+}; |
+ |
+} // namespace mojo |
+ |
+#endif // NET_DNS_HOST_RESOLVER_MOJO_HOST_H_ |