| 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_DNS_HOST_RESOLVER_IMPL_H_ | 5 #ifndef NET_DNS_HOST_RESOLVER_IMPL_H_ |
| 6 #define NET_DNS_HOST_RESOLVER_IMPL_H_ | 6 #define NET_DNS_HOST_RESOLVER_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 size_t max_queued_jobs_; | 253 size_t max_queued_jobs_; |
| 254 | 254 |
| 255 // Parameters for ProcTask. | 255 // Parameters for ProcTask. |
| 256 ProcTaskParams proc_params_; | 256 ProcTaskParams proc_params_; |
| 257 | 257 |
| 258 NetLog* net_log_; | 258 NetLog* net_log_; |
| 259 | 259 |
| 260 // Address family to use when the request doesn't specify one. | 260 // Address family to use when the request doesn't specify one. |
| 261 AddressFamily default_address_family_; | 261 AddressFamily default_address_family_; |
| 262 | 262 |
| 263 base::WeakPtrFactory<HostResolverImpl> weak_ptr_factory_; | |
| 264 | |
| 265 base::WeakPtrFactory<HostResolverImpl> probe_weak_ptr_factory_; | |
| 266 | |
| 267 // If present, used by DnsTask and ServeFromHosts to resolve requests. | 263 // If present, used by DnsTask and ServeFromHosts to resolve requests. |
| 268 scoped_ptr<DnsClient> dns_client_; | 264 scoped_ptr<DnsClient> dns_client_; |
| 269 | 265 |
| 270 // True if received valid config from |dns_config_service_|. Temporary, used | 266 // True if received valid config from |dns_config_service_|. Temporary, used |
| 271 // to measure performance of DnsConfigService: http://crbug.com/125599 | 267 // to measure performance of DnsConfigService: http://crbug.com/125599 |
| 272 bool received_dns_config_; | 268 bool received_dns_config_; |
| 273 | 269 |
| 274 // Number of consecutive failures of DnsTask, counted when fallback succeeds. | 270 // Number of consecutive failures of DnsTask, counted when fallback succeeds. |
| 275 unsigned num_dns_failures_; | 271 unsigned num_dns_failures_; |
| 276 | 272 |
| 277 // True if probing is done for each Request to set address family. When false, | 273 // True if probing is done for each Request to set address family. When false, |
| 278 // explicit setting in |default_address_family_| is used. | 274 // explicit setting in |default_address_family_| is used. |
| 279 bool probe_ipv6_support_; | 275 bool probe_ipv6_support_; |
| 280 | 276 |
| 281 // True if DnsConfigService detected that system configuration depends on | 277 // True if DnsConfigService detected that system configuration depends on |
| 282 // local IPv6 connectivity. Disables probing. | 278 // local IPv6 connectivity. Disables probing. |
| 283 bool use_local_ipv6_; | 279 bool use_local_ipv6_; |
| 284 | 280 |
| 285 // True iff ProcTask has successfully resolved a hostname known to have IPv6 | 281 // True iff ProcTask has successfully resolved a hostname known to have IPv6 |
| 286 // addresses using ADDRESS_FAMILY_UNSPECIFIED. Reset on IP address change. | 282 // addresses using ADDRESS_FAMILY_UNSPECIFIED. Reset on IP address change. |
| 287 bool resolved_known_ipv6_hostname_; | 283 bool resolved_known_ipv6_hostname_; |
| 288 | 284 |
| 289 // Any resolver flags that should be added to a request by default. | 285 // Any resolver flags that should be added to a request by default. |
| 290 HostResolverFlags additional_resolver_flags_; | 286 HostResolverFlags additional_resolver_flags_; |
| 291 | 287 |
| 292 // Allow fallback to ProcTask if DnsTask fails. | 288 // Allow fallback to ProcTask if DnsTask fails. |
| 293 bool fallback_to_proctask_; | 289 bool fallback_to_proctask_; |
| 294 | 290 |
| 291 base::WeakPtrFactory<HostResolverImpl> weak_ptr_factory_; |
| 292 |
| 293 base::WeakPtrFactory<HostResolverImpl> probe_weak_ptr_factory_; |
| 294 |
| 295 DISALLOW_COPY_AND_ASSIGN(HostResolverImpl); | 295 DISALLOW_COPY_AND_ASSIGN(HostResolverImpl); |
| 296 }; | 296 }; |
| 297 | 297 |
| 298 } // namespace net | 298 } // namespace net |
| 299 | 299 |
| 300 #endif // NET_DNS_HOST_RESOLVER_IMPL_H_ | 300 #endif // NET_DNS_HOST_RESOLVER_IMPL_H_ |
| OLD | NEW |