| Index: net/http/http_response_headers.h
|
| diff --git a/net/http/http_response_headers.h b/net/http/http_response_headers.h
|
| index 6a5dc83c35482bc22c07d1ba4fd367f31a76fa7f..60943e22386ca7840c781576db97e9063eb56094 100644
|
| --- a/net/http/http_response_headers.h
|
| +++ b/net/http/http_response_headers.h
|
| @@ -190,25 +190,38 @@ class NET_EXPORT HttpResponseHeaders
|
| // redirect.
|
| static bool IsRedirectResponseCode(int response_code);
|
|
|
| - // Returns true if the response cannot be reused without validation. The
|
| - // result is relative to the current_time parameter, which is a parameter to
|
| - // support unit testing. The request_time parameter indicates the time at
|
| + // Returns the time from which this resource can no longer be reused without
|
| + // validation. |request_time| is the local time at which the request that
|
| + // resulted in this response was made. |response_time| is the local time at
|
| + // which we received this response.
|
| + base::Time GetFreshnessExpiry(base::Time request_time,
|
| + base::Time response_time) const;
|
| +
|
| + // Returns true if the response cannot be reused without validation. The
|
| + // result is relative to the |current_time| parameter, which is a parameter to
|
| + // support unit testing. The |request_time| parameter indicates the time at
|
| // which the request was made that resulted in this response, which was
|
| - // received at response_time.
|
| - bool RequiresValidation(const base::Time& request_time,
|
| - const base::Time& response_time,
|
| - const base::Time& current_time) const;
|
| + // received at |response_time|.
|
| + bool RequiresValidation(base::Time request_time,
|
| + base::Time response_time,
|
| + base::Time current_time) const;
|
|
|
| // Returns the amount of time the server claims the response is fresh from
|
| - // the time the response was generated. See section 13.2.4 of RFC 2616. See
|
| - // RequiresValidation for a description of the response_time parameter.
|
| - base::TimeDelta GetFreshnessLifetime(const base::Time& response_time) const;
|
| -
|
| - // Returns the age of the response. See section 13.2.3 of RFC 2616.
|
| - // See RequiresValidation for a description of this method's parameters.
|
| - base::TimeDelta GetCurrentAge(const base::Time& request_time,
|
| - const base::Time& response_time,
|
| - const base::Time& current_time) const;
|
| + // the time the response was generated. See section 13.2.4 of RFC 2616.
|
| + // |response_time| is the local time at which we received this response. If
|
| + // a finite (possibly zero) freshness lifetime exists, it is returned in the
|
| + // output parameter |finite_freshness_lifetime|, and |was_finite| is set to
|
| + // false. If |was_finite| is true, the resource is fresh indefinitely, and
|
| + // |finite_freshness_lifetime| has an undefined value.
|
| + void GetFreshnessLifetime(base::Time response_time,
|
| + base::TimeDelta* finite_freshness_lifetime,
|
| + bool* was_finite) const;
|
| +
|
| + // Returns the time at which this resource had age zero. |request_time| is the
|
| + // local time at which the request that resulted in this response was made.
|
| + // |response_time| is the local time at which we received this response.
|
| + base::Time GetFreshnessOrigin(base::Time request_time,
|
| + base::Time response_time) const;
|
|
|
| // The following methods extract values from the response headers. If a
|
| // value is not present, then false is returned. Otherwise, true is returned
|
|
|