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

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

Issue 2612793002: Implement ContentSecurityPolicy on the browser-side. (Closed)
Patch Set: Add the TODO and bug ids that was forgotten. Created 3 years, 10 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/CSPDirectiveList.h
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h
index 7dba69f3398462354117a0d391c704f04d508ad2..ecc64b96794eba6890ce914bebbb8ad09bbb6893 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h
+++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h
@@ -14,6 +14,7 @@
#include "platform/network/HTTPParsers.h"
#include "platform/network/ResourceRequest.h"
#include "platform/weborigin/KURL.h"
+#include "public/platform/WebContentSecurityPolicy.h"
#include "wtf/Vector.h"
#include "wtf/text/AtomicString.h"
#include "wtf/text/WTFString.h"
@@ -162,6 +163,18 @@ class CORE_EXPORT CSPDirectiveList
// https://w3c.github.io/webappsec-csp/embedded/#subsume-policy
bool subsumes(const CSPDirectiveListVector&);
+ // Export a subset of the Policy. The primary goal of this method is to make
+ // the embedders aware of the directives that affect navigation, as the
+ // embedder is responsible for navigational enforcement.
+ // It currently contains the following ones:
+ // * default-src
+ // * child-src
+ // * frame-src
+ // * form-action
+ // The exported directives only contains sources that affect navigation. For
+ // instance it doesn't contains 'unsafe-inline' or 'unsafe-eval'
+ WebContentSecurityPolicyPolicy exposeForNavigationalChecks() const;
+
DECLARE_TRACE();
private:

Powered by Google App Engine
This is Rietveld 408576698