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

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

Issue 1828063002: Add support for origin trials in workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trial-token-in-header-blink-document
Patch Set: fix test flakyness Created 4 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: 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 46743f12f7e07262d0b9a2d2ca43d751331d585b..41295956cc6cd03daa2c2ee8841a5fcf044568df 100644
--- a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
@@ -30,6 +30,7 @@
#include "core/dom/ExecutionContext.h"
#include "core/html/parser/TextResourceDecoder.h"
#include "core/loader/WorkerThreadableLoader.h"
+#include "core/origin_trials/OriginTrialContext.h"
#include "core/workers/WorkerGlobalScope.h"
#include "platform/HTTPNames.h"
#include "platform/network/ContentSecurityPolicyResponseHeaders.h"
@@ -136,6 +137,7 @@ void WorkerScriptLoader::didReceiveResponse(unsigned long identifier, const Reso
m_responseEncoding = response.textEncodingName();
m_appCacheID = response.appCacheID();
processContentSecurityPolicy(response);
+ m_originTrialTokens = OriginTrialContext::parseHeaderValue(response.httpHeaderField(HTTPNames::Origin_Trial));
if (NetworkUtils::isReservedIPAddress(response.remoteIPAddress())) {
m_responseAddressSpace = SecurityOrigin::create(m_responseURL)->isLocalhost()

Powered by Google App Engine
This is Rietveld 408576698