diff options
author | pauljensen@chromium.org <pauljensen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-08 02:13:17 +0000 |
---|---|---|
committer | pauljensen@chromium.org <pauljensen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-08 02:13:17 +0000 |
commit | 4f84e34113a8364b58df007394be4a5fa4c13618 (patch) | |
tree | 80b90242dcc1a99bc9c71fa283b1e96a0857c7f7 | |
parent | 15962b836c6fdd7bfa3c2e85d02c4832e213acd5 (diff) | |
download | chromium_src-4f84e34113a8364b58df007394be4a5fa4c13618.zip chromium_src-4f84e34113a8364b58df007394be4a5fa4c13618.tar.gz chromium_src-4f84e34113a8364b58df007394be4a5fa4c13618.tar.bz2 |
Remove measurement of DNS resolution waste from not always performing AF_UNSPEC
lookups. The measurement code has been in long enough to draw conclusions.
This is simply a revert of r151312 and r151710.
BUG=139811
Review URL: https://chromiumcodereview.appspot.com/11734020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175469 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/base/host_resolver_impl.cc | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc index 4b6bb3ad..c54bf9da 100644 --- a/net/base/host_resolver_impl.cc +++ b/net/base/host_resolver_impl.cc @@ -1725,45 +1725,6 @@ int HostResolverImpl::Resolve(const RequestInfo& info, JobMap::iterator jobit = jobs_.find(key); Job* job; if (jobit == jobs_.end()) { - // If we couldn't find the desired address family, check to see if the - // other family is in the cache or another job, which indicates waste, - // and we should fix crbug.com/139811. - { - bool ipv4 = key.address_family == ADDRESS_FAMILY_IPV4; - Key other_family_key = key; - other_family_key.address_family = ipv4 ? - ADDRESS_FAMILY_UNSPECIFIED : ADDRESS_FAMILY_IPV4; - bool found_other_family_cache = false; - bool found_other_family_job = false; - if (default_address_family_ == ADDRESS_FAMILY_UNSPECIFIED) { - found_other_family_cache = cache_.get() && - cache_->Lookup(other_family_key, base::TimeTicks::Now()) != NULL; - if (!found_other_family_cache) - found_other_family_job = jobs_.count(other_family_key) > 0; - } - enum { // Used in UMA_HISTOGRAM_ENUMERATION. - AF_WASTE_IPV4_ONLY, - AF_WASTE_CACHE_IPV4, - AF_WASTE_CACHE_UNSPEC, - AF_WASTE_JOB_IPV4, - AF_WASTE_JOB_UNSPEC, - AF_WASTE_NONE_IPV4, - AF_WASTE_NONE_UNSPEC, - AF_WASTE_MAX, // Bounding value. - } category = AF_WASTE_MAX; - if (default_address_family_ != ADDRESS_FAMILY_UNSPECIFIED) { - category = AF_WASTE_IPV4_ONLY; - } else if (found_other_family_cache) { - category = ipv4 ? AF_WASTE_CACHE_IPV4 : AF_WASTE_CACHE_UNSPEC; - } else if (found_other_family_job) { - category = ipv4 ? AF_WASTE_JOB_IPV4 : AF_WASTE_JOB_UNSPEC; - } else { - category = ipv4 ? AF_WASTE_NONE_IPV4 : AF_WASTE_NONE_UNSPEC; - } - UMA_HISTOGRAM_ENUMERATION("DNS.ResolveUnspecWaste", category, - AF_WASTE_MAX); - } - job = new Job(weak_ptr_factory_.GetWeakPtr(), key, info.priority(), request_net_log); job->Schedule(); |