diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-04 05:28:21 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-04 05:28:21 +0000 |
commit | 079fc0db5e3faeda06f20dcf36bbaad49381069c (patch) | |
tree | a0ce8534bccf204a68ab5e225d24e21def5cc4cb /chrome/browser/net/dns_host_info.h | |
parent | 9144b709860f43daa89385467131f3abd0a73df4 (diff) | |
download | chromium_src-079fc0db5e3faeda06f20dcf36bbaad49381069c.zip chromium_src-079fc0db5e3faeda06f20dcf36bbaad49381069c.tar.gz chromium_src-079fc0db5e3faeda06f20dcf36bbaad49381069c.tar.bz2 |
Use a priority queue to assure that subresources are resolved asap
Also implement DNS congestion avoidance in the pre-fetch system.
BUG=13276
r=mbelshe
Review URL: http://codereview.chromium.org/118149
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/dns_host_info.h')
-rw-r--r-- | chrome/browser/net/dns_host_info.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/chrome/browser/net/dns_host_info.h b/chrome/browser/net/dns_host_info.h index 5ffca75..34160d5 100644 --- a/chrome/browser/net/dns_host_info.h +++ b/chrome/browser/net/dns_host_info.h @@ -52,11 +52,11 @@ class DnsHostInfo { enum DnsProcessingState { // When processed by our prefetching system, the states are: PENDING, // Constructor has completed. - QUEUED, // In prefetch queue but not yet being resolved. - ASSIGNED, // Currently being processed. + QUEUED, // In name queue but not yet being resolved. + ASSIGNED, // Being resolved (or being reset to earlier state) ASSIGNED_BUT_MARKED, // Needs to be deleted as soon as it's resolved. - FOUND, // DNS prefetch search completed. - NO_SUCH_NAME, // DNS prefetch search completed. + FOUND, // DNS resolution completed. + NO_SUCH_NAME, // DNS resolution completed. // When processed by the network stack during navigation, the states are: STARTED, // Resolution has begun for a navigation. FINISHED, // Resolution has completed for a navigation. @@ -74,6 +74,7 @@ class DnsHostInfo { // initializing of the DnsMaster's map (of info for Hostnames). DnsHostInfo() : state_(PENDING), + old_prequeue_state_(state_), resolve_duration_(kNullDuration), queue_duration_(kNullDuration), benefits_remaining_(), @@ -95,6 +96,7 @@ class DnsHostInfo { // The prefetching lifecycle. void SetQueuedState(ResolutionMotivation motivation); void SetAssignedState(); + void RemoveFromQueue(); void SetPendingDeleteState(); void SetFoundState(); void SetNoSuchNameState(); @@ -157,7 +159,13 @@ class DnsHostInfo { // The next declaration is non-const to facilitate testing. static base::TimeDelta kCacheExpirationDuration; + // The current state of this instance. DnsProcessingState state_; + + // Record the state prior to going to a queued state, in case we have to back + // out of the queue. + DnsProcessingState old_prequeue_state_; + std::string hostname_; // Hostname for this info. // When was last state changed (usually lookup completed). |