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

Unified Diff: third_party/WebKit/Source/core/frame/csp/RemoteContentSecurityPolicy.h

Issue 2190183002: Forward CSP violation reporting from RenderFrameProxy to RenderFrameImpl. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove no longer applicable TODO and early exit from reportViolation method. Created 4 years, 4 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/frame/csp/RemoteContentSecurityPolicy.h
diff --git a/third_party/WebKit/Source/core/frame/csp/RemoteContentSecurityPolicy.h b/third_party/WebKit/Source/core/frame/csp/RemoteContentSecurityPolicy.h
new file mode 100644
index 0000000000000000000000000000000000000000..d2604eddb7b25bc1dc959dda0222391933c91d0b
--- /dev/null
+++ b/third_party/WebKit/Source/core/frame/csp/RemoteContentSecurityPolicy.h
@@ -0,0 +1,31 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef RemoteContentSecurityPolicy_h
+#define RemoteContentSecurityPolicy_h
+
+#include "core/frame/csp/ContentSecurityPolicy.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class RemoteFrameClient;
+
+class RemoteContentSecurityPolicy : public ContentSecurityPolicy {
alexmos 2016/08/09 18:01:20 Perhaps add a class-level comment explaining why t
Łukasz Anforowicz 2016/08/09 22:23:20 Done.
alexmos 2016/08/10 20:34:33 The new comment is awesome. Thanks for adding!
+public:
+ static RemoteContentSecurityPolicy* create(RemoteFrameClient*);
+ ~RemoteContentSecurityPolicy() override;
+ DECLARE_VIRTUAL_TRACE();
+
+ void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<String>& reportEndpoints, const String& header, ViolationType, LocalFrame*, RedirectStatus, int contextLine) override;
+
+private:
+ RemoteContentSecurityPolicy(RemoteFrameClient*);
alexmos 2016/08/09 18:01:20 nit: explicit
Łukasz Anforowicz 2016/08/09 22:23:20 Done.
+
+ Member<RemoteFrameClient> m_remoteFrameClient;
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698