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

Unified Diff: third_party/WebKit/Source/core/frame/csp/CSPSource.cpp

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/CSPSource.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp b/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp
index 3b5ed5cce1c5cc84c004ccdbf3283fdcdd77ed51..511f666e5a6453515350a639059bed3149a7c318 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp
@@ -205,6 +205,20 @@ bool CSPSource::firstSubsumesSecond(
return true;
}
+WebContentSecurityPolicySourceExpression
+CSPSource::exposeForNavigationalChecks() const {
+ WebContentSecurityPolicySourceExpression sourceExpression;
+ sourceExpression.scheme = m_scheme;
+ sourceExpression.host = m_host;
+ sourceExpression.isHostWildcard =
+ static_cast<WebWildcardDisposition>(m_hostWildcard);
+ sourceExpression.port = m_port;
+ sourceExpression.isPortWildcard =
+ static_cast<WebWildcardDisposition>(m_portWildcard);
+ sourceExpression.path = m_path;
+ return sourceExpression;
+}
+
DEFINE_TRACE(CSPSource) {
visitor->trace(m_policy);
}

Powered by Google App Engine
This is Rietveld 408576698