summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/dns_host_info.h
diff options
context:
space:
mode:
authordsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-27 20:43:33 +0000
committerdsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-27 20:43:33 +0000
commite1acf6f902e50222baf99bfb492ecc38a1604975 (patch)
tree503d45705b14be7e2f1ed86c71d6064abbf90fbe /chrome/browser/net/dns_host_info.h
parenta2f5993e1ce940e8a8eec900abaeed02e2eee09b (diff)
downloadchromium_src-e1acf6f902e50222baf99bfb492ecc38a1604975.zip
chromium_src-e1acf6f902e50222baf99bfb492ecc38a1604975.tar.gz
chromium_src-e1acf6f902e50222baf99bfb492ecc38a1604975.tar.bz2
Move Time, TimeDelta and TimeTicks into namespace base.
Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/dns_host_info.h')
-rw-r--r--chrome/browser/net/dns_host_info.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/chrome/browser/net/dns_host_info.h b/chrome/browser/net/dns_host_info.h
index ee446e1..2f2a51c 100644
--- a/chrome/browser/net/dns_host_info.h
+++ b/chrome/browser/net/dns_host_info.h
@@ -44,14 +44,14 @@ class DnsHostInfo {
STARTED, // Resolution has begun.
FINISHED, // Resolution has completed.
FINISHED_UNRESOLVED}; // No resolution found.
- static const TimeDelta kMaxNonNetworkDnsLookupDuration;
+ static const base::TimeDelta kMaxNonNetworkDnsLookupDuration;
// The number of OS cache entries we can guarantee(?) before cache eviction
// might likely take place.
static const int kMaxGuaranteedCacheSize = 50;
typedef std::vector<DnsHostInfo> DnsInfoTable;
- static const TimeDelta kNullDuration;
+ static const base::TimeDelta kNullDuration;
// DnsHostInfo are usually made by the default constructor during
// initializing of the DnsMaster's map (of info for Hostnames).
@@ -71,7 +71,7 @@ class DnsHostInfo {
// on how recently we've done DNS prefetching for hostname.
bool NeedsDnsUpdate(const std::string& hostname);
- static void set_cache_expiration(TimeDelta time);
+ static void set_cache_expiration(base::TimeDelta time);
// The prefetching lifecycle.
void SetQueuedState();
@@ -102,9 +102,9 @@ class DnsHostInfo {
return (hostname == hostname_);
}
- TimeDelta resolve_duration() const { return resolve_duration_;}
- TimeDelta queue_duration() const { return queue_duration_;}
- TimeDelta benefits_remaining() const { return benefits_remaining_; }
+ base::TimeDelta resolve_duration() const { return resolve_duration_;}
+ base::TimeDelta queue_duration() const { return queue_duration_;}
+ base::TimeDelta benefits_remaining() const { return benefits_remaining_; }
DnsBenefit AcruePrefetchBenefits(DnsHostInfo* later_host_info);
@@ -117,22 +117,26 @@ class DnsHostInfo {
private:
// The next declaration is non-const to facilitate testing.
- static TimeDelta kCacheExpirationDuration;
+ static base::TimeDelta kCacheExpirationDuration;
DnsProcessingState state_;
std::string hostname_; // Hostname for this info.
- TimeTicks time_; // When was last state changed (usually lookup completed).
- TimeDelta resolve_duration_; // Time needed for DNS to resolve.
- TimeDelta queue_duration_; // Time spent in queue.
- TimeDelta benefits_remaining_; // Unused potential benefits of a prefetch.
+ // When was last state changed (usually lookup completed).
+ base::TimeTicks time_;
+ // Time needed for DNS to resolve.
+ base::TimeDelta resolve_duration_;
+ // Time spent in queue.
+ base::TimeDelta queue_duration_;
+ // Unused potential benefits of a prefetch.
+ base::TimeDelta benefits_remaining_;
int sequence_number_; // Used to calculate potential of cache eviction.
static int sequence_counter; // Used to allocate sequence_number_'s.
- TimeDelta GetDuration() {
- TimeTicks old_time = time_;
- time_ = TimeTicks::Now();
+ base::TimeDelta GetDuration() {
+ base::TimeTicks old_time = time_;
+ time_ = base::TimeTicks::Now();
return time_ - old_time;
}
@@ -147,4 +151,3 @@ class DnsHostInfo {
} // namespace chrome_browser_net
#endif // CHROME_BROWSER_NET_DNS_HOST_INFO_H_
-