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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerScriptLoader.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/WorkerScriptLoader.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
index 7bdabf14214438d6f7769914afbec7b71d412dff..fa24d5aa93e098b8db039cf6afbc1fdf2a2c336c 100644
--- a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
@@ -33,6 +33,7 @@
#include "core/origin_trials/OriginTrialContext.h"
#include "core/workers/WorkerGlobalScope.h"
#include "platform/HTTPNames.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "platform/network/ContentSecurityPolicyResponseHeaders.h"
#include "platform/network/NetworkUtils.h"
#include "platform/network/ResourceResponse.h"
@@ -137,6 +138,9 @@ void WorkerScriptLoader::didReceiveResponse(unsigned long identifier, const Reso
m_responseURL = response.url();
m_responseEncoding = response.textEncodingName();
m_appCacheID = response.appCacheID();
+
+ if (RuntimeEnabledFeatures::referrerPolicyHeaderEnabled())
+ m_referrerPolicy = response.httpHeaderField(HTTPNames::Referrer_Policy);
processContentSecurityPolicy(response);
m_originTrialTokens = OriginTrialContext::parseHeaderValue(response.httpHeaderField(HTTPNames::Origin_Trial));

Powered by Google App Engine
This is Rietveld 408576698