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

Unified Diff: Source/web/WebSharedWorkerImpl.cpp

Issue 1190493002: move processContentSecurityPolicy to WorkerScriptLoader (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: (rebase) Created 5 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
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebSharedWorkerImpl.cpp
diff --git a/Source/web/WebSharedWorkerImpl.cpp b/Source/web/WebSharedWorkerImpl.cpp
index 660c3e2869bd117491ca9575eb53afa3b931a55f..cb10bb6558f0df79fe8e281d57e775543e4da416 100644
--- a/Source/web/WebSharedWorkerImpl.cpp
+++ b/Source/web/WebSharedWorkerImpl.cpp
@@ -106,7 +106,6 @@ public:
{
m_identifier = identifier;
m_appCacheID = response.appCacheID();
- processContentSecurityPolicy(response);
(*m_receiveResponseCallback)();
}
@@ -125,6 +124,7 @@ public:
String script() const { return m_scriptLoader->script(); }
unsigned long identifier() const { return m_identifier; }
long long appCacheID() const { return m_appCacheID; }
+ PassRefPtr<ContentSecurityPolicy> contentSecurityPolicy() { return m_scriptLoader->contentSecurityPolicy(); }
private:
Loader()
@@ -132,7 +132,7 @@ private:
, m_identifier(0)
, m_appCacheID(0)
{
- setContentSecurityPolicy(ContentSecurityPolicy::create());
+ m_scriptLoader->setContentSecurityPolicy(ContentSecurityPolicy::create());
}
RefPtr<WorkerScriptLoader> m_scriptLoader;
@@ -411,7 +411,15 @@ void WebSharedWorkerImpl::onScriptLoaderFinished()
provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::create());
WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin());
provideContentSettingsClientToWorker(workerClients.get(), adoptPtr(m_client->createWorkerContentSettingsClientProxy(webSecurityOrigin)));
- OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->script(), nullptr, startMode, m_mainScriptLoader->contentSecurityPolicy()->headers(), starterOrigin, workerClients.release());
+ OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::create(
+ m_url,
+ m_loadingDocument->userAgent(m_url),
+ m_mainScriptLoader->script(),
+ nullptr,
+ startMode,
+ m_mainScriptLoader->contentSecurityPolicy()->headers(),
+ starterOrigin,
+ workerClients.release());
m_loaderProxy = WorkerLoaderProxy::create(this);
setWorkerThread(SharedWorkerThread::create(m_name, m_loaderProxy, *this));
InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScriptLoader->identifier(), m_mainScriptLoader->script());
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698