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

Unified Diff: net/http/http_cache_transaction.cc

Issue 665023002: Post-commit fixes for "stale-while-revalidate..." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename stucture members. Created 6 years, 2 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 5441e90f33ffa7d27377bb07dac4a67ab954338c..4b8e757b836ef34a3daa067436f38d7fae118e36 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -2404,9 +2404,9 @@ bool HttpCache::Transaction::ConditionalizeRequest() {
if (!use_if_range) {
// stale-while-revalidate is not useful when we only have a partial response
// cached, so don't set the header in that case.
- HttpResponseHeaders::FreshnessLifetimes lifetime =
+ HttpResponseHeaders::FreshnessLifetimes lifetimes =
response_.headers->GetFreshnessLifetimes(response_.response_time);
- if (lifetime.stale > TimeDelta()) {
+ if (lifetimes.staleness > TimeDelta()) {
TimeDelta current_age = response_.headers->GetCurrentAge(
response_.request_time, response_.response_time, Time::Now());
@@ -2414,8 +2414,8 @@ bool HttpCache::Transaction::ConditionalizeRequest() {
kFreshnessHeader,
base::StringPrintf("max-age=%" PRId64
",stale-while-revalidate=%" PRId64 ",age=%" PRId64,
- lifetime.fresh.InSeconds(),
- lifetime.stale.InSeconds(),
+ lifetimes.freshness.InSeconds(),
+ lifetimes.staleness.InSeconds(),
current_age.InSeconds()));
}
}

Powered by Google App Engine
This is Rietveld 408576698