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

Unified Diff: chrome/browser/predictors/resource_prefetch_predictor.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: chrome/browser/predictors/resource_prefetch_predictor.cc
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc
index bc941c5aac1b7634eed995e551f030cc298cefda..3b5df355d830e59ab5338907fd9a4751d11cff14 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.cc
+++ b/chrome/browser/predictors/resource_prefetch_predictor.cc
@@ -287,7 +287,9 @@ bool ResourcePrefetchPredictor::IsCacheable(const net::URLRequest* response) {
base::Time response_time(response_info.response_time);
response_time += base::TimeDelta::FromSeconds(1);
base::TimeDelta freshness =
- response_info.headers->GetFreshnessLifetimes(response_time).freshness;
+ response_info.headers->GetExpirationTimes(response_info.request_time,
+ response_time)
+ .freshness_lifetime;
return freshness > base::TimeDelta();
}

Powered by Google App Engine
This is Rietveld 408576698