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

Unified Diff: third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp

Issue 2086143006: Implement Referrer-Policy header for workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix shared worker path Created 4 years, 6 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: third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp
index 880efb51cc3d22aafd7b960e3f7fd4e5e1447268..7474219c3069f7d493ba41d6a43ad51f92e71653 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp
@@ -89,6 +89,13 @@ ContentSecurityPolicy* InProcessWorkerBase::contentSecurityPolicy()
return m_contentSecurityPolicy.get();
}
+String InProcessWorkerBase::referrerPolicy()
+{
+ if (m_scriptLoader)
+ return m_scriptLoader->referrerPolicy();
+ return m_referrerPolicy;
+}
+
void InProcessWorkerBase::onResponse()
{
InspectorInstrumentation::didReceiveScriptResponse(getExecutionContext(), m_scriptLoader->identifier());
@@ -104,6 +111,7 @@ void InProcessWorkerBase::onFinished()
InspectorInstrumentation::scriptImported(getExecutionContext(), m_scriptLoader->identifier(), m_scriptLoader->script());
}
m_contentSecurityPolicy = m_scriptLoader->releaseContentSecurityPolicy();
+ m_referrerPolicy = m_scriptLoader->referrerPolicy();
m_scriptLoader = nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698