diff options
author | laforge@chromium.org <laforge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 04:44:35 +0000 |
---|---|---|
committer | laforge@chromium.org <laforge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 04:44:35 +0000 |
commit | f961537bd3f0fce50f3fe7e76712d62d598ca5b4 (patch) | |
tree | 4906bca1b797ee06b85e870bd114df6073027277 | |
parent | 3cf6f89c559c9402abb12b705ebd84624d67e265 (diff) | |
download | chromium_src-f961537bd3f0fce50f3fe7e76712d62d598ca5b4.zip chromium_src-f961537bd3f0fce50f3fe7e76712d62d598ca5b4.tar.gz chromium_src-f961537bd3f0fce50f3fe7e76712d62d598ca5b4.tar.bz2 |
Revert 224617 "Revert 195406 "[net/dns] Test IPv6 support via UD..."
> Revert 195406 "[net/dns] Test IPv6 support via UDP connect"
>
> Breaks DirectAccess on win. Fixed in 223595.
>
> BUG=259792
>
> > [net/dns] Test IPv6 support via UDP connect
> >
> > After this CL, the effective address family will be determined by
> > the UDP connect test rather than the last interface enumeration probe.
> >
> > BUG=223876
> >
> > Review URL: https://codereview.chromium.org/14161008
>
> TBR=szym@chromium.org
>
> Review URL: https://codereview.chromium.org/23478045
TBR=szym@chromium.org
Review URL: https://codereview.chromium.org/24350003
git-svn-id: svn://svn.chromium.org/chrome/branches/1599/src@224663 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/dns/host_resolver_impl.cc | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc index 5b5f7ae..1063177 100644 --- a/net/dns/host_resolver_impl.cc +++ b/net/dns/host_resolver_impl.cc @@ -2023,32 +2023,35 @@ HostResolverImpl::Key HostResolverImpl::GetEffectiveKeyForRequest( AddressFamily effective_address_family = info.address_family(); if (info.address_family() == ADDRESS_FAMILY_UNSPECIFIED) { - base::TimeTicks start_time = base::TimeTicks::Now(); - // Google DNS address. - const uint8 kIPv6Address[] = - { 0x20, 0x01, 0x48, 0x60, 0x48, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88 }; - bool rv6 = IsGloballyReachable( - IPAddressNumber(kIPv6Address, kIPv6Address + arraysize(kIPv6Address))); - - UMA_HISTOGRAM_TIMES("Net.IPv6ConnectDuration", - base::TimeTicks::Now() - start_time); - if (rv6) { - UMA_HISTOGRAM_BOOLEAN("Net.IPv6ConnectSuccessMatch", - default_address_family_ == ADDRESS_FAMILY_UNSPECIFIED); + if (probe_ipv6_support_) { + base::TimeTicks start_time = base::TimeTicks::Now(); + // Google DNS address. + const uint8 kIPv6Address[] = + { 0x20, 0x01, 0x48, 0x60, 0x48, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88 }; + IPAddressNumber address(kIPv6Address, + kIPv6Address + arraysize(kIPv6Address)); + bool rv6 = IsGloballyReachable(address, net_log); + if (rv6) + net_log.AddEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_IPV6_SUPPORTED); + + UMA_HISTOGRAM_TIMES("Net.IPv6ConnectDuration", + base::TimeTicks::Now() - start_time); + if (rv6) { + UMA_HISTOGRAM_BOOLEAN("Net.IPv6ConnectSuccessMatch", + default_address_family_ == ADDRESS_FAMILY_UNSPECIFIED); + } else { + UMA_HISTOGRAM_BOOLEAN("Net.IPv6ConnectFailureMatch", + default_address_family_ != ADDRESS_FAMILY_UNSPECIFIED); + + effective_address_family = ADDRESS_FAMILY_IPV4; + effective_flags |= HOST_RESOLVER_DEFAULT_FAMILY_SET_DUE_TO_NO_IPV6; + } } else { - UMA_HISTOGRAM_BOOLEAN("Net.IPv6ConnectFailureMatch", - default_address_family_ != ADDRESS_FAMILY_UNSPECIFIED); + effective_address_family = default_address_family_; } } - if (effective_address_family == ADDRESS_FAMILY_UNSPECIFIED && - default_address_family_ != ADDRESS_FAMILY_UNSPECIFIED) { - effective_address_family = default_address_family_; - if (ipv6_probe_monitoring_) - effective_flags |= HOST_RESOLVER_DEFAULT_FAMILY_SET_DUE_TO_NO_IPV6; - } - return Key(info.hostname(), effective_address_family, effective_flags); } |