Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: net/http/http_cache_transaction.cc

Issue 154243006: Add GetExpirationTimes() to HttpResponseHeader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: appcache Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 15ad924df8f846599166ad663f6c01d3b3dbe94c..82f2620a64efa3e17e43d8fa5eae0d5ee6a4d6c0 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -1995,10 +1995,11 @@ bool HttpCache::Transaction::RequiresValidation() {
if (request_->method == "PUT" || request_->method == "DELETE")
return true;
- if (response_.headers->RequiresValidation(
- response_.request_time, response_.response_time, Time::Now())) {
+ const Time freshness_expiry =
+ response_.headers->GetFreshnessExpiry(response_.request_time,
+ response_.response_time);
+ if (freshness_expiry >= Time::Now())
return true;
- }
return false;
}

Powered by Google App Engine
This is Rietveld 408576698