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

Unified Diff: content/browser/appcache/appcache_update_job.cc

Issue 154243006: Add GetExpirationTimes() to HttpResponseHeader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move a function body Created 4 years, 8 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: content/browser/appcache/appcache_update_job.cc
diff --git a/content/browser/appcache/appcache_update_job.cc b/content/browser/appcache/appcache_update_job.cc
index de3e527ed23776f1825d8ced29895b5d6346cf88..c99a7ea9e1edcc5509d489eb69c5b3bddcc48a8c 100644
--- a/content/browser/appcache/appcache_update_job.cc
+++ b/content/browser/appcache/appcache_update_job.cc
@@ -1472,10 +1472,11 @@ void AppCacheUpdateJob::OnResponseInfoLoaded(
const std::string name = "vary";
std::string value;
size_t iter = 0;
+ net::HttpResponseHeaders::ExpirationTimes expiration_times =
+ http_info->headers->GetExpirationTimes(http_info->request_time,
+ http_info->response_time);
if (!http_info->headers.get() ||
- http_info->headers->RequiresValidation(http_info->request_time,
- http_info->response_time,
- base::Time::Now()) ||
+ base::Time::Now() >= expiration_times.GetExpirationTime() ||
http_info->headers->EnumerateHeader(&iter, name, &value)) {
LoadFromNewestCacheFailed(url, response_info);
} else {

Powered by Google App Engine
This is Rietveld 408576698