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

Unified Diff: third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.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/SharedWorkerGlobalScope.cpp
diff --git a/third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.cpp
index 5c09b8e339d7c7d61b5f06896033e57c8520aecc..e72ab482e6bbe46256c01c17f4948835df475f02 100644
--- a/third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.cpp
@@ -34,6 +34,7 @@
#include "core/events/MessageEvent.h"
#include "core/inspector/ConsoleMessage.h"
#include "core/frame/LocalDOMWindow.h"
+#include "core/origin_trials/OriginTrialContext.h"
#include "core/workers/SharedWorkerThread.h"
#include "core/workers/WorkerClients.h"
#include "wtf/CurrentTime.h"
@@ -55,6 +56,7 @@ SharedWorkerGlobalScope* SharedWorkerGlobalScope::create(const String& name, Sha
SharedWorkerGlobalScope* context = new SharedWorkerGlobalScope(name, startupData->m_scriptURL, startupData->m_userAgent, thread, startupData->m_starterOriginPrivilegeData.release(), startupData->m_workerClients.release());
context->applyContentSecurityPolicyFromVector(*startupData->m_contentSecurityPolicyHeaders);
context->setAddressSpace(startupData->m_addressSpace);
+ OriginTrialContext::addTokens(context, startupData->m_originTrialTokens.get());
return context;
}

Powered by Google App Engine
This is Rietveld 408576698