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

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

Issue 2612793002: Implement ContentSecurityPolicy on the browser-side. (Closed)
Patch Set: Rename SchemeShouldBypass => SchemeShouldBypassCSP. 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..43c5c0816acf0e377075553a03985c4512e382f9 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp
@@ -205,6 +205,17 @@ bool CSPSource::firstSubsumesSecond(
return true;
}
+WebContentSecurityPolicySourceExpression CSPSource::expose() const {
+ WebContentSecurityPolicySourceExpression sourceExpression;
+ sourceExpression.scheme = m_scheme;
+ sourceExpression.host = m_host;
+ sourceExpression.isHostWildcard = (m_hostWildcard == HasWildcard);
Mike West 2017/02/13 14:10:51 Nit: It seems like we should either use booleans o
arthursonzogni 2017/02/14 17:07:03 Okay, let's use an enum in blink.
+ sourceExpression.port = m_port;
+ sourceExpression.isPortWildcard = (m_portWildcard == HasWildcard);
+ sourceExpression.path = m_path;
+ return sourceExpression;
+}
+
DEFINE_TRACE(CSPSource) {
visitor->trace(m_policy);
}

Powered by Google App Engine
This is Rietveld 408576698