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_BASE_HOST_RESOLVER_H_ | 5 #ifndef NET_BASE_HOST_RESOLVER_H_ |
6 #define NET_BASE_HOST_RESOLVER_H_ | 6 #define NET_BASE_HOST_RESOLVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
13 #include "net/base/address_family.h" | 13 #include "net/base/address_family.h" |
14 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
15 #include "net/base/host_port_pair.h" | 15 #include "net/base/host_port_pair.h" |
16 #include "net/base/net_export.h" | 16 #include "net/base/net_export.h" |
17 #include "net/base/net_util.h" | 17 #include "net/base/net_util.h" |
18 #include "net/base/request_priority.h" | 18 #include "net/base/request_priority.h" |
19 | 19 |
20 namespace net { | 20 namespace net { |
21 | 21 |
22 class AddressList; | 22 class AddressList; |
23 class BoundNetLog; | 23 class BoundNetLog; |
24 class HostCache; | 24 class HostCache; |
25 class HostResolverImpl; | |
26 class HostResolverProc; | 25 class HostResolverProc; |
27 class NetLog; | 26 class NetLog; |
28 | 27 |
29 // This class represents the task of resolving hostnames (or IP address | 28 // This class represents the task of resolving hostnames (or IP address |
30 // literal) to an AddressList object. | 29 // literal) to an AddressList object. |
31 // | 30 // |
32 // HostResolver can handle multiple requests at a time, so when cancelling a | 31 // HostResolver can handle multiple requests at a time, so when cancelling a |
33 // request the RequestHandle that was returned by Resolve() needs to be | 32 // request the RequestHandle that was returned by Resolve() needs to be |
34 // given. A simpler alternative for consumers that only have 1 outstanding | 33 // given. A simpler alternative for consumers that only have 1 outstanding |
35 // request at a time is to create a SingleRequestHostResolver wrapper around | 34 // request at a time is to create a SingleRequestHostResolver wrapper around |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 NetLog* net_log); | 218 NetLog* net_log); |
220 | 219 |
221 // Creates a HostResolver implementation that sends actual DNS queries to | 220 // Creates a HostResolver implementation that sends actual DNS queries to |
222 // the specified DNS server and parses response and returns results. | 221 // the specified DNS server and parses response and returns results. |
223 NET_EXPORT HostResolver* CreateAsyncHostResolver(size_t max_concurrent_resolves, | 222 NET_EXPORT HostResolver* CreateAsyncHostResolver(size_t max_concurrent_resolves, |
224 const IPAddressNumber& dns_ip, | 223 const IPAddressNumber& dns_ip, |
225 NetLog* net_log); | 224 NetLog* net_log); |
226 } // namespace net | 225 } // namespace net |
227 | 226 |
228 #endif // NET_BASE_HOST_RESOLVER_H_ | 227 #endif // NET_BASE_HOST_RESOLVER_H_ |
OLD | NEW |