| Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
|
| diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
|
| index 6c2492b923fabc4ee15c98ead676777f266501dc..439c01637ea4f5de9434c7215ba32022f04c4865 100644
|
| --- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
|
| +++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
|
| @@ -574,18 +574,8 @@ void ResourceFetcher::initializeRevalidation(const FetchRequest& request, Resour
|
| revalidatingRequest.clearHTTPReferrer();
|
| initializeResourceRequest(revalidatingRequest, resource->getType(), request.defer());
|
|
|
| - const AtomicString& lastModified = resource->response().httpHeaderField(HTTPNames::Last_Modified);
|
| - const AtomicString& eTag = resource->response().httpHeaderField(HTTPNames::ETag);
|
| - if (!lastModified.isEmpty() || !eTag.isEmpty()) {
|
| - ASSERT(context().getCachePolicy() != CachePolicyReload);
|
| - if (context().getCachePolicy() == CachePolicyRevalidate)
|
| - revalidatingRequest.setHTTPHeaderField(HTTPNames::Cache_Control, "max-age=0");
|
| - }
|
| - if (!lastModified.isEmpty())
|
| - revalidatingRequest.setHTTPHeaderField(HTTPNames::If_Modified_Since, lastModified);
|
| - if (!eTag.isEmpty())
|
| - revalidatingRequest.setHTTPHeaderField(HTTPNames::If_None_Match, eTag);
|
| -
|
| + // TODO(toyoshim): Figure out if following code is really needed and
|
| + // how this code works with Stale-While-Revalidate field trial.
|
| double stalenessLifetime = resource->stalenessLifetime();
|
| if (std::isfinite(stalenessLifetime) && stalenessLifetime > 0) {
|
| revalidatingRequest.setHTTPHeaderField(HTTPNames::Resource_Freshness, AtomicString(String::format("max-age=%.0lf,stale-while-revalidate=%.0lf,age=%.0lf", resource->freshnessLifetime(), stalenessLifetime, resource->currentAge())));
|
|
|