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

Unified Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 271083002: Resource Timing: Use original Timing-Allow-Origin for cache validating (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add tst Created 6 years, 7 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: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index 30d6de95f1c8e2aec4ed3e87d953d115c99ee33a..c890592cbdc2c3b80468cd713949fb664bf24c15 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -867,6 +867,12 @@ void ResourceFetcher::storeResourceTimingInitiatorInformation(Resource* resource
RefPtr<ResourceTimingInfo> info = ResourceTimingInfo::create(resource->options().initiatorInfo.name, monotonicallyIncreasingTime());
+ if (resource->isCacheValidator()) {
+ const AtomicString& timingAllowOrigin = resource->resourceToRevalidate()->response().httpHeaderField("Timing-Allow-Origin");
+ if (!timingAllowOrigin.isEmpty())
+ info->setOriginalTimingAllowOrigin(timingAllowOrigin);
+ }
+
if (resource->type() == Resource::MainResource) {
// <iframe>s should report the initial navigation requested by the parent document, but not subsequent navigations.
if (frame()->ownerElement() && !frame()->ownerElement()->loadedNonEmptyDocument()) {

Powered by Google App Engine
This is Rietveld 408576698