Index: net/dns/host_resolver_mojo.h |
diff --git a/net/dns/host_resolver_mojo.h b/net/dns/host_resolver_mojo.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0061acce5c1b7813b5dd30c31a7277ada21f77f5 |
--- /dev/null |
+++ b/net/dns/host_resolver_mojo.h |
@@ -0,0 +1,47 @@ |
+// Copyright 2015 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_H_ |
+#define NET_DNS_HOST_RESOLVER_MOJO_H_ |
+ |
+#include "base/threading/thread_checker.h" |
+#include "net/base/address_list.h" |
Anand Mistry (off Chromium)
2015/02/16 06:32:44
You can forward-declare this one.
Sam McNally
2015/02/16 07:24:44
Done.
|
+#include "net/dns/host_resolver.h" |
+#include "net/interfaces/host_resolver_service.mojom.h" |
+ |
+namespace net { |
+ |
+class BoundNetLog; |
+ |
+class HostResolverMojo : public HostResolver { |
Anand Mistry (off Chromium)
2015/02/16 06:32:44
Add a short blurb here about what this is.
Sam McNally
2015/02/16 07:24:44
Done.
|
+ public: |
+ HostResolverMojo(interfaces::HostResolverPtr resolver, |
+ mojo::ErrorHandler* error_handler); |
Anand Mistry (off Chromium)
2015/02/16 06:32:44
I'm having a hard time liking passing in an error
Sam McNally
2015/02/16 07:24:44
Switched to a callback. I'd prefer to avoid leavin
|
+ ~HostResolverMojo() override; |
+ |
+ // HostResolver overrides. |
+ int Resolve(const RequestInfo& info, |
+ RequestPriority priority, |
+ AddressList* addresses, |
+ const CompletionCallback& callback, |
+ RequestHandle* request_handle, |
+ const BoundNetLog& source_net_log) override; |
+ int ResolveFromCache(const RequestInfo& info, |
+ AddressList* addresses, |
+ const BoundNetLog& source_net_log) override; |
+ void CancelRequest(RequestHandle req) override; |
+ |
+ private: |
+ class Job; |
+ |
+ interfaces::HostResolverPtr resolver_; |
+ |
+ base::ThreadChecker thread_checker_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(HostResolverMojo); |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_DNS_HOST_RESOLVER_MOJO_H_ |