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

Unified Diff: Source/web/WebEmbeddedWorkerImpl.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/core/workers/WorkerScriptLoaderClient.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebEmbeddedWorkerImpl.cpp
diff --git a/Source/web/WebEmbeddedWorkerImpl.cpp b/Source/web/WebEmbeddedWorkerImpl.cpp
index 454773ce0d33fe3312862959bbf95b728ed3c799..b64695bfa3cf0a4b4d9d0a588ef440ae3fbdc9ac 100644
--- a/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -92,13 +92,6 @@ public:
*loadingContext, scriptURL, DenyCrossOriginRequests, this);
}
- void didReceiveResponse(unsigned long identifier, const ResourceResponse& response) override
- {
- m_contentSecurityPolicy = ContentSecurityPolicy::create();
- m_contentSecurityPolicy->setOverrideURLForSelf(response.url());
- m_contentSecurityPolicy->didReceiveHeaders(ContentSecurityPolicyResponseHeaders(response));
- }
-
virtual void notifyFinished() override
{
(*m_callback)();
@@ -114,7 +107,7 @@ public:
String script() const { return m_scriptLoader->script(); }
const Vector<char>* cachedMetadata() const { return m_scriptLoader->cachedMetadata(); }
PassOwnPtr<Vector<char>> releaseCachedMetadata() const { return m_scriptLoader->releaseCachedMetadata(); }
- PassRefPtr<ContentSecurityPolicy> releaseContentSecurityPolicy() { return m_contentSecurityPolicy.release(); }
+ PassRefPtr<ContentSecurityPolicy> releaseContentSecurityPolicy() { return m_scriptLoader->releaseContentSecurityPolicy(); }
private:
Loader() : m_scriptLoader(WorkerScriptLoader::create())
@@ -123,7 +116,6 @@ private:
RefPtr<WorkerScriptLoader> m_scriptLoader;
OwnPtr<Closure> m_callback;
- RefPtr<ContentSecurityPolicy> m_contentSecurityPolicy;
};
WebEmbeddedWorker* WebEmbeddedWorker::create(WebServiceWorkerContextClient* client, WebWorkerContentSettingsClientProxy* contentSettingsClient)
« no previous file with comments | « Source/core/workers/WorkerScriptLoaderClient.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698