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

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: rebase Created 6 years, 9 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 03bb909cf09e64bca4e879a469299410c2597c53..08fb45204d8d1cfcf58a53f69e2c99013984e04b 100644
--- a/webkit/browser/appcache/appcache_update_job.cc
+++ b/webkit/browser/appcache/appcache_update_job.cc
@@ -1237,10 +1237,12 @@ 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 expiration_time = base::Time();
+ if (http_info->headers) {
+ expiration_time = http_info->headers->GetExpirationTime(
+ http_info->request_time, http_info->response_time);
+ }
+ if (expiration_time <= base::Time::Now() ||
http_info->headers->EnumerateHeader(&iter, name, &value)) {
LoadFromNewestCacheFailed(url, response_info);
} else {
« net/http/http_response_headers.cc ('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