summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/dns_host_info.h
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 01:34:20 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 01:34:20 +0000
commita20bc0936892ff263c48f3afebcac93af64c2348 (patch)
tree0e858c535f1dce3aa57ab4cdef84097b6f40b717 /chrome/browser/net/dns_host_info.h
parent7cb25c28530dcd7739c1441588ad1deade53b5ee (diff)
downloadchromium_src-a20bc0936892ff263c48f3afebcac93af64c2348.zip
chromium_src-a20bc0936892ff263c48f3afebcac93af64c2348.tar.gz
chromium_src-a20bc0936892ff263c48f3afebcac93af64c2348.tar.bz2
Reverting 17638.
This relands http://src.chromium.org/viewvc/chrome?view=rev&revision=17605 which was reverted in 17638. It also disables MassiveConcurrentLookupTest, which was a stress test, and is partially obsolete since the class now responds to congestion produced by NOT resolving all names. BUG=13356 TBR=willchan Review URL: http://codereview.chromium.org/119196 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17697 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/dns_host_info.h')
-rw-r--r--chrome/browser/net/dns_host_info.h16
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).