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

Unified Diff: Source/core/dom/ExecutionContext.cpp

Issue 1117203002: Enforce referrer policies for workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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: Source/core/dom/ExecutionContext.cpp
diff --git a/Source/core/dom/ExecutionContext.cpp b/Source/core/dom/ExecutionContext.cpp
index a559d1c459d0b23cf46a16752ff19ece544d013a..1657d55b4d42b019b062c9f1cfe777d3ddb33259 100644
--- a/Source/core/dom/ExecutionContext.cpp
+++ b/Source/core/dom/ExecutionContext.cpp
@@ -73,6 +73,7 @@ ExecutionContext::ExecutionContext()
, m_strictMixedContentCheckingEnforced(false)
, m_windowInteractionTokens(0)
, m_isRunSuspendableTasksScheduled(false)
+ , m_referrerPolicy(ReferrerPolicyDefault)
{
}
@@ -248,6 +249,12 @@ bool ExecutionContext::isWindowInteractionAllowed() const
return m_windowInteractionTokens > 0;
}
+void ExecutionContext::setReferrerPolicy(ReferrerPolicy referrerPolicy)
+{
+ // FIXME: Can we adopt the CSP referrer policy merge algorithm? Or does the web rely on being able to modify the referrer policy in-flight?
+ m_referrerPolicy = referrerPolicy;
+}
+
void ExecutionContext::removeURLFromMemoryCache(const KURL& url)
{
memoryCache()->removeURLFromCache(url);

Powered by Google App Engine
This is Rietveld 408576698