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

Unified Diff: third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp

Issue 1957783002: Replicate Content-Security-Policy into remote frame proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback from dcheng@. Created 4 years, 7 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/web/WebRemoteFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
index 0889a3f70005d2e980887351f7796f26528b1db2..59b02f2cefb43683d07cf98a88c3c23ddfd09de9 100644
--- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
@@ -4,8 +4,11 @@
#include "web/WebRemoteFrameImpl.h"
+#include "core/dom/RemoteSecurityContext.h"
+#include "core/dom/SecurityContext.h"
#include "core/frame/FrameView.h"
#include "core/frame/Settings.h"
+#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/html/HTMLFrameOwnerElement.h"
#include "core/layout/LayoutObject.h"
#include "core/page/Page.h"
@@ -647,6 +650,19 @@ void WebRemoteFrameImpl::setReplicatedName(const WebString& name, const WebStrin
frame()->tree().setPrecalculatedName(name, uniqueName);
}
+void WebRemoteFrameImpl::addReplicatedContentSecurityPolicyHeader(const WebString& headerValue, WebContentSecurityPolicyType type, WebContentSecurityPolicySource source) const
+{
+ frame()->securityContext()->contentSecurityPolicy()->addPolicyFromHeaderValue(
+ headerValue,
+ static_cast<ContentSecurityPolicyHeaderType>(type),
+ static_cast<ContentSecurityPolicyHeaderSource>(source));
+}
+
+void WebRemoteFrameImpl::resetReplicatedContentSecurityPolicy() const
+{
+ frame()->securityContext()->resetReplicatedContentSecurityPolicy();
+}
+
void WebRemoteFrameImpl::setReplicatedShouldEnforceStrictMixedContentChecking(bool shouldEnforce) const
{
DCHECK(frame());
« no previous file with comments | « third_party/WebKit/Source/web/WebRemoteFrameImpl.h ('k') | third_party/WebKit/public/web/WebContentSecurityPolicy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698