OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_DNS_HOST_RESOLVER_MOJO_H_ |
| 6 #define NET_DNS_HOST_RESOLVER_MOJO_H_ |
| 7 |
| 8 #include "base/threading/thread_checker.h" |
| 9 #include "net/base/address_list.h" |
| 10 #include "net/dns/host_resolver.h" |
| 11 #include "net/interfaces/host_resolver_service.mojom.h" |
| 12 |
| 13 namespace net { |
| 14 |
| 15 class BoundNetLog; |
| 16 |
| 17 class HostResolverMojo : public HostResolver { |
| 18 public: |
| 19 HostResolverMojo(interfaces::HostResolverPtr resolver, |
| 20 mojo::ErrorHandler* error_handler); |
| 21 ~HostResolverMojo() override; |
| 22 |
| 23 // HostResolver overrides. |
| 24 int Resolve(const RequestInfo& info, |
| 25 RequestPriority priority, |
| 26 AddressList* addresses, |
| 27 const CompletionCallback& callback, |
| 28 RequestHandle* request_handle, |
| 29 const BoundNetLog& source_net_log) override; |
| 30 int ResolveFromCache(const RequestInfo& info, |
| 31 AddressList* addresses, |
| 32 const BoundNetLog& source_net_log) override; |
| 33 void CancelRequest(RequestHandle req) override; |
| 34 |
| 35 private: |
| 36 class Job; |
| 37 |
| 38 interfaces::HostResolverPtr resolver_; |
| 39 |
| 40 base::ThreadChecker thread_checker_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(HostResolverMojo); |
| 43 }; |
| 44 |
| 45 } // namespace net |
| 46 |
| 47 #endif // NET_DNS_HOST_RESOLVER_MOJO_H_ |
OLD | NEW |