Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/SecurityContext.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/SecurityContext.cpp b/third_party/WebKit/Source/core/dom/SecurityContext.cpp |
| index 04e8421cdbd62371c8cb27b46bf2e275b1243f16..df384837ec6da5cb3a61b514fa76ed816cec5928 100644 |
| --- a/third_party/WebKit/Source/core/dom/SecurityContext.cpp |
| +++ b/third_party/WebKit/Source/core/dom/SecurityContext.cpp |
| @@ -99,4 +99,15 @@ void SecurityContext::enforceSuborigin(const Suborigin& suborigin) { |
| didUpdateSecurityOrigin(); |
| } |
| +void SecurityContext::setFeaturePolicyFromHeader( |
| + const String& headerValue, |
| + SecurityContext* parentSecurityContext, |
| + Vector<String>* messages) { |
|
raymes
2016/11/21 02:17:34
I think we should DCHECK(!m_featurePolicy) here?
iclelland
2016/11/21 05:05:33
To ensure that it hasn't been set previously -- ce
|
| + m_featurePolicy = FeaturePolicy::createFromParentPolicy( |
| + (parentSecurityContext ? parentSecurityContext->getFeaturePolicy() |
| + : nullptr), |
| + m_securityOrigin); |
| + m_featurePolicy->setHeaderPolicy(headerValue, messages); |
| +} |
| + |
| } // namespace blink |