Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/base/address_family.h" | 12 #include "net/base/address_family.h" |
| 13 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
| 14 #include "net/base/host_port_pair.h" | 14 #include "net/base/host_port_pair.h" |
| 15 #include "net/base/net_export.h" | 15 #include "net/base/net_export.h" |
| 16 #include "net/base/net_util.h" | 16 #include "net/base/net_util.h" |
| 17 #include "net/base/request_priority.h" | 17 #include "net/base/request_priority.h" |
| 18 | 18 |
| 19 namespace base { | 19 namespace base { |
| 20 class Value; | 20 class Value; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace net { | 23 namespace net { |
| 24 | 24 |
| 25 class AddressList; | 25 class AddressList; |
| 26 class BoundNetLog; | 26 class BoundNetLog; |
| 27 class HostCache; | 27 class HostCache; |
| 28 class HostResolverProc; | 28 class HostResolverProc; |
| 29 class NetLog; | 29 class NetLog; |
| 30 class DnsConfigService; | |
| 30 | 31 |
| 31 // This class represents the task of resolving hostnames (or IP address | 32 // This class represents the task of resolving hostnames (or IP address |
| 32 // literal) to an AddressList object. | 33 // literal) to an AddressList object. |
| 33 // | 34 // |
| 34 // HostResolver can handle multiple requests at a time, so when cancelling a | 35 // HostResolver can handle multiple requests at a time, so when cancelling a |
| 35 // request the RequestHandle that was returned by Resolve() needs to be | 36 // request the RequestHandle that was returned by Resolve() needs to be |
| 36 // given. A simpler alternative for consumers that only have 1 outstanding | 37 // given. A simpler alternative for consumers that only have 1 outstanding |
| 37 // request at a time is to create a SingleRequestHostResolver wrapper around | 38 // request at a time is to create a SingleRequestHostResolver wrapper around |
| 38 // HostResolver (which will automatically cancel the single request when it | 39 // HostResolver (which will automatically cancel the single request when it |
| 39 // goes out of scope). | 40 // goes out of scope). |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 size_t max_retry_attempts, | 198 size_t max_retry_attempts, |
| 198 NetLog* net_log); | 199 NetLog* net_log); |
| 199 | 200 |
| 200 // As above, but the HostResolver will use the asynchronous DNS client in | 201 // As above, but the HostResolver will use the asynchronous DNS client in |
| 201 // DnsTransaction, which will be configured using DnsConfigService to match | 202 // DnsTransaction, which will be configured using DnsConfigService to match |
| 202 // the system DNS settings. If the client fails, the resolver falls back to | 203 // the system DNS settings. If the client fails, the resolver falls back to |
| 203 // the global HostResolverProc. | 204 // the global HostResolverProc. |
| 204 NET_EXPORT HostResolver* CreateAsyncHostResolver(size_t max_concurrent_resolves, | 205 NET_EXPORT HostResolver* CreateAsyncHostResolver(size_t max_concurrent_resolves, |
| 205 size_t max_retry_attempts, | 206 size_t max_retry_attempts, |
| 206 NetLog* net_log); | 207 NetLog* net_log); |
| 208 | |
| 209 NET_EXPORT HostResolver* CreateHostResolver( | |
|
szym
2012/05/14 18:48:32
I think you should just |#include "net/base/host_r
Daniele
2012/05/17 23:04:34
Done.
| |
| 210 size_t max_concurrent_resolves, | |
| 211 size_t max_retry_attempts, | |
| 212 HostCache* cache, | |
| 213 scoped_ptr<DnsConfigService> config_service, | |
| 214 NetLog* net_log); | |
| 215 | |
| 207 } // namespace net | 216 } // namespace net |
| 208 | 217 |
| 209 #endif // NET_BASE_HOST_RESOLVER_H_ | 218 #endif // NET_BASE_HOST_RESOLVER_H_ |
| OLD | NEW |