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

Unified Diff: Source/core/workers/WorkerScriptLoaderClient.h

Issue 1128813003: Give shared workers their own content security policies (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 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: Source/core/workers/WorkerScriptLoaderClient.h
diff --git a/Source/core/workers/WorkerScriptLoaderClient.h b/Source/core/workers/WorkerScriptLoaderClient.h
index 9044d07e18fe418b5f4b27ec9cb3bc2a65d5b08b..07f0f619535cefe915e81ec9f7bf3dcc433b2b38 100644
--- a/Source/core/workers/WorkerScriptLoaderClient.h
+++ b/Source/core/workers/WorkerScriptLoaderClient.h
@@ -29,9 +29,11 @@
#define WorkerScriptLoaderClient_h
#include "core/CoreExport.h"
+#include "wtf/RefPtr.h"
namespace blink {
+class ContentSecurityPolicy;
class ResourceResponse;
class CORE_EXPORT WorkerScriptLoaderClient {
@@ -42,8 +44,16 @@ public:
// This will cause leaks when we support nested workers.
virtual void notifyFinished() { }
+ PassRefPtr<ContentSecurityPolicy> contentSecurityPolicy();
+
protected:
- virtual ~WorkerScriptLoaderClient() { }
+ virtual ~WorkerScriptLoaderClient();
+
+ void processContentSecurityPolicy(const ResourceResponse&);
+ void setContentSecurityPolicy(PassRefPtr<ContentSecurityPolicy>);
+
+private:
+ RefPtr<ContentSecurityPolicy> m_contentSecurityPolicy;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698