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

Unified Diff: webkit/browser/appcache/appcache_update_job.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: webkit/browser/appcache/appcache_update_job.cc
diff --git a/webkit/browser/appcache/appcache_update_job.cc b/webkit/browser/appcache/appcache_update_job.cc
index 17e3bef6da644a90a10eab2081ed9ee41f2a8523..6d4d5058b45f28812a9dca629c46e86b28714797 100644
--- a/webkit/browser/appcache/appcache_update_job.cc
+++ b/webkit/browser/appcache/appcache_update_job.cc
@@ -1193,10 +1193,11 @@ void AppCacheUpdateJob::OnResponseInfoLoaded(
const std::string name = "vary";
std::string value;
void* iter = NULL;
- if (!http_info->headers.get() ||
- http_info->headers->RequiresValidation(http_info->request_time,
- http_info->response_time,
- base::Time::Now()) ||
+ base::Time freshness_expiry =
+ http_info->headers ? base::Time() :
+ http_info->headers->GetFreshnessExpiry(http_info->request_time,
+ http_info->response_time);
+ if (freshness_expiry <= base::Time::Now() ||
http_info->headers->EnumerateHeader(&iter, name, &value)) {
LoadFromNewestCacheFailed(url, response_info);
} else {
« net/http/http_response_headers.h ('K') | « net/http/http_response_headers_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698