Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Unified Diff: net/dns/host_resolver_impl.cc

Issue 24365006: Revert 195406 "[net/dns] Test IPv6 support via UDP connect" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1599/src/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/host_resolver_impl.cc
===================================================================
--- net/dns/host_resolver_impl.cc (revision 224775)
+++ net/dns/host_resolver_impl.cc (working copy)
@@ -2023,35 +2023,35 @@
AddressFamily effective_address_family = info.address_family();
if (info.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);
+ 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;
- }
+ UMA_HISTOGRAM_TIMES("Net.IPv6ConnectDuration",
+ base::TimeTicks::Now() - start_time);
+ if (rv6) {
+ UMA_HISTOGRAM_BOOLEAN("Net.IPv6ConnectSuccessMatch",
+ default_address_family_ == ADDRESS_FAMILY_UNSPECIFIED);
} else {
- effective_address_family = default_address_family_;
+ UMA_HISTOGRAM_BOOLEAN("Net.IPv6ConnectFailureMatch",
+ default_address_family_ != ADDRESS_FAMILY_UNSPECIFIED);
}
}
+ if (effective_address_family == ADDRESS_FAMILY_UNSPECIFIED &&
+ default_address_family_ != ADDRESS_FAMILY_UNSPECIFIED) {
+ effective_address_family = default_address_family_;
+ if (probe_ipv6_support_)
+ effective_flags |= HOST_RESOLVER_DEFAULT_FAMILY_SET_DUE_TO_NO_IPV6;
+ }
+
return Key(info.hostname(), effective_address_family, effective_flags);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698