OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_DNS_ASYNC_HOST_RESOLVER_H_ | 5 #ifndef NET_DNS_ASYNC_HOST_RESOLVER_H_ |
6 #define NET_DNS_ASYNC_HOST_RESOLVER_H_ | 6 #define NET_DNS_ASYNC_HOST_RESOLVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
11 | 11 |
12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
13 #include "base/threading/non_thread_safe.h" | 13 #include "base/threading/non_thread_safe.h" |
14 #include "net/base/address_family.h" | 14 #include "net/base/address_family.h" |
15 #include "net/base/host_cache.h" | 15 #include "net/base/host_cache.h" |
16 #include "net/base/host_resolver.h" | 16 #include "net/base/host_resolver.h" |
17 #include "net/base/ip_endpoint.h" | 17 #include "net/base/ip_endpoint.h" |
18 #include "net/base/net_log.h" | 18 #include "net/base/net_log.h" |
19 #include "net/base/rand_callback.h" | 19 #include "net/base/rand_callback.h" |
20 #include "net/dns/dns_transaction.h" | 20 #include "net/dns/dns_transaction.h" |
21 | 21 |
22 namespace net { | 22 namespace net { |
23 | 23 |
24 class AddressesList; | 24 class AddressesList; |
25 class ClientSocketFactory; | 25 class ClientSocketFactory; |
26 | 26 |
27 class NET_API AsyncHostResolver | 27 class NET_EXPORT AsyncHostResolver |
28 : public HostResolver, | 28 : public HostResolver, |
29 public DnsTransaction::Delegate, | 29 public DnsTransaction::Delegate, |
30 NON_EXPORTED_BASE(public base::NonThreadSafe) { | 30 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
31 public: | 31 public: |
32 AsyncHostResolver(const IPEndPoint& dns_server, | 32 AsyncHostResolver(const IPEndPoint& dns_server, |
33 size_t max_transactions, | 33 size_t max_transactions, |
34 size_t max_pending_requests_, | 34 size_t max_pending_requests_, |
35 const RandIntCallback& rand_int, | 35 const RandIntCallback& rand_int, |
36 HostCache* cache, | 36 HostCache* cache, |
37 ClientSocketFactory* factory, | 37 ClientSocketFactory* factory, |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 int next_request_id_; | 154 int next_request_id_; |
155 | 155 |
156 NetLog* net_log_; | 156 NetLog* net_log_; |
157 | 157 |
158 DISALLOW_COPY_AND_ASSIGN(AsyncHostResolver); | 158 DISALLOW_COPY_AND_ASSIGN(AsyncHostResolver); |
159 }; | 159 }; |
160 | 160 |
161 } // namespace net | 161 } // namespace net |
162 | 162 |
163 #endif // NET_DNS_ASYNC_HOST_RESOLVER_H_ | 163 #endif // NET_DNS_ASYNC_HOST_RESOLVER_H_ |
OLD | NEW |