diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-04 17:12:48 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-04 17:12:48 +0000 |
commit | fadca57773a35311b287a159fb1e0e62e22d5ccc (patch) | |
tree | 7809e2b2d236b7f0d3e76d9928d457d96872eeef /chrome/browser/net/dns_host_info.cc | |
parent | 8568d97d7e4b58029613618e9dcd2c8771238be6 (diff) | |
download | chromium_src-fadca57773a35311b287a159fb1e0e62e22d5ccc.zip chromium_src-fadca57773a35311b287a159fb1e0e62e22d5ccc.tar.gz chromium_src-fadca57773a35311b287a159fb1e0e62e22d5ccc.tar.bz2 |
Fix purify freeze. Revert "Use a priority queue to assure that subresources are resolved asap"
This reverts git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17605 0039d316-1c4b-4281-b951-d872f2087c98
TBR=jar
Review URL: http://codereview.chromium.org/118239
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17638 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/dns_host_info.cc')
-rw-r--r-- | chrome/browser/net/dns_host_info.cc | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/chrome/browser/net/dns_host_info.cc b/chrome/browser/net/dns_host_info.cc index dbfde3b..d40acd7 100644 --- a/chrome/browser/net/dns_host_info.cc +++ b/chrome/browser/net/dns_host_info.cc @@ -77,7 +77,6 @@ void DnsHostInfo::set_cache_expiration(TimeDelta time) { void DnsHostInfo::SetQueuedState(ResolutionMotivation motivation) { DCHECK(PENDING == state_ || FOUND == state_ || NO_SUCH_NAME == state_); - old_prequeue_state_ = state_; state_ = QUEUED; queue_duration_ = resolve_duration_ = kNullDuration; SetMotivation(motivation); @@ -93,24 +92,6 @@ void DnsHostInfo::SetAssignedState() { UMA_HISTOGRAM_TIMES("DNS.PrefetchQueue", queue_duration_); } -void DnsHostInfo::RemoveFromQueue() { - DCHECK(ASSIGNED == state_); - state_ = old_prequeue_state_; - DLogResultsStats("DNS Prefetch reset to prequeue"); - static const TimeDelta kBoundary = TimeDelta::FromSeconds(2); - if (queue_duration_ > kBoundary) { - UMA_HISTOGRAM_MEDIUM_TIMES("DNS.QueueRecycledDeltaOver2", - queue_duration_ - kBoundary); - return; - } - // Make a custom linear histogram for the region from 0 to boundary. - const size_t kBucketCount = 52; - static LinearHistogram histogram("DNS.QueueRecycledUnder2", TimeDelta(), - kBoundary, kBucketCount); - histogram.SetFlags(kUmaTargetedHistogramFlag); - histogram.AddTime(queue_duration_); -} - void DnsHostInfo::SetPendingDeleteState() { DCHECK(ASSIGNED == state_ || ASSIGNED_BUT_MARKED == state_); state_ = ASSIGNED_BUT_MARKED; @@ -162,7 +143,7 @@ void DnsHostInfo::SetFinishedState(bool was_resolved) { void DnsHostInfo::SetHostname(const std::string& hostname) { if (hostname != hostname_) { - DCHECK_EQ(hostname_.size(), 0u); // Not yet initialized. + DCHECK(hostname_.size() == 0); // Not yet initialized. hostname_ = hostname; } } @@ -190,7 +171,7 @@ bool DnsHostInfo::IsStillCached() const { DnsBenefit DnsHostInfo::AccruePrefetchBenefits(DnsHostInfo* navigation_info) { DCHECK(FINISHED == navigation_info->state_ || FINISHED_UNRESOLVED == navigation_info->state_); - DCHECK_EQ(navigation_info->hostname_, hostname_.data()); + DCHECK(0 == navigation_info->hostname_.compare(hostname_.data())); if ((0 == benefits_remaining_.InMilliseconds()) || (FOUND != state_ && NO_SUCH_NAME != state_)) { |