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

Side by Side 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: Sanitize report endpoints from IPC against actual CSP contents. 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef RemoteContentSecurityPolicy_h
6 #define RemoteContentSecurityPolicy_h
7
8 #include "core/frame/csp/ContentSecurityPolicy.h"
9 #include "platform/heap/Handle.h"
10
11 namespace blink {
12
13 class RemoteFrameClient;
14
15 // RemoteContentSecurityPolicy is a class that specializes some aspects of CSP
16 // handling for cases when CSP is associated with a RemoteSecurityContext /
17 // RemoteFrame. Such cases can occur when frame-src, parent-src or plugin-types
18 // directives need to consult CSP from a parent frame and when the parent frame
19 // is an OOPIF. An example of specialized behavior is
20 // RemoteContentSecurityPolicy::reportViolation which needs to forward
21 // processing of CSP violations into the renderer process associated with the
22 // remote frame.
23 //
24 // TODO(lukasza): This class should no longer be needed once frame-src,
25 // parent-src, plugin-types (and other similar directive) checks are moved to
26 // the browser process (https://crbug.com/376522).
27 class RemoteContentSecurityPolicy : public ContentSecurityPolicy {
28 public:
29 static RemoteContentSecurityPolicy* create(RemoteFrameClient*);
30 ~RemoteContentSecurityPolicy() override;
31 DECLARE_VIRTUAL_TRACE();
32
33 void reportViolation(const String& directiveText, const String& effectiveDir ective, const String& consoleMessage, const KURL& blockedURL, const Vector<Strin g>& reportEndpoints, const String& header, ViolationType, LocalFrame*, RedirectS tatus, int contextLine) override;
34
35 private:
36 explicit RemoteContentSecurityPolicy(RemoteFrameClient*);
37
38 Member<RemoteFrameClient> m_remoteFrameClient;
39 };
40
41 } // namespace blink
42
43 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698