| Index: net/base/host_cache.h
|
| diff --git a/net/base/host_cache.h b/net/base/host_cache.h
|
| index 7aff49c1ba16dc85cd145c9298ed2314e3ad953e..2a3aedc69f60c2694da95ca353ccc23f44d39080 100644
|
| --- a/net/base/host_cache.h
|
| +++ b/net/base/host_cache.h
|
| @@ -22,13 +22,19 @@ namespace net {
|
| class NET_EXPORT HostCache : NON_EXPORTED_BASE(public base::NonThreadSafe) {
|
| public:
|
| // Stores the latest address list that was looked up for a hostname.
|
| - struct Entry {
|
| + struct NET_EXPORT Entry {
|
| + Entry(int error, const AddressList& addrlist, base::TimeDelta ttl);
|
| + // Use when |ttl| is unknown.
|
| Entry(int error, const AddressList& addrlist);
|
| ~Entry();
|
|
|
| + bool has_ttl() const { return ttl >= base::TimeDelta(); }
|
| +
|
| // The resolve results for this entry.
|
| int error;
|
| AddressList addrlist;
|
| + // TTL obtained from the nameserver. Negative if unknown.
|
| + base::TimeDelta ttl;
|
| };
|
|
|
| struct Key {
|
| @@ -67,11 +73,10 @@ class NET_EXPORT HostCache : NON_EXPORTED_BASE(public base::NonThreadSafe) {
|
| const Entry* Lookup(const Key& key, base::TimeTicks now);
|
|
|
| // Overwrites or creates an entry for |key|.
|
| - // (|error|, |addrlist|) is the value to set, |now| is the current time
|
| + // |entry| is the value to set, |now| is the current time
|
| // |ttl| is the "time to live".
|
| void Set(const Key& key,
|
| - int error,
|
| - const AddressList& addrlist,
|
| + const Entry& entry,
|
| base::TimeTicks now,
|
| base::TimeDelta ttl);
|
|
|
|
|