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

Unified Diff: content/common/frame_owner_properties.cc

Issue 2378643002: Propagating csp attribute changes on frameOwnerPropertiesChanged() (Closed)
Patch Set: rebasing on master Created 4 years, 2 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
« no previous file with comments | « content/common/frame_owner_properties.h ('k') | content/test/data/frame_owner_properties_csp.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/frame_owner_properties.cc
diff --git a/content/common/frame_owner_properties.cc b/content/common/frame_owner_properties.cc
index aca8709cbc09885515b032908dd4d6d66bde08d4..e84de4237015b817c2b1c0a7cdf7ad24b04befc9 100644
--- a/content/common/frame_owner_properties.cc
+++ b/content/common/frame_owner_properties.cc
@@ -21,6 +21,7 @@ FrameOwnerProperties::FrameOwnerProperties(
margin_width(web_frame_owner_properties.marginWidth),
margin_height(web_frame_owner_properties.marginHeight),
allow_fullscreen(web_frame_owner_properties.allowFullscreen),
+ required_csp(web_frame_owner_properties.requiredCsp.utf8()),
delegated_permissions(
web_frame_owner_properties.delegatedPermissions.begin(),
web_frame_owner_properties.delegatedPermissions.end()) {}
@@ -35,6 +36,7 @@ blink::WebFrameOwnerProperties FrameOwnerProperties::ToWebFrameOwnerProperties()
result.marginWidth = margin_width;
result.marginHeight = margin_height;
result.allowFullscreen = allow_fullscreen;
+ result.requiredCsp = blink::WebString::fromUTF8(required_csp);
result.delegatedPermissions =
blink::WebVector<blink::WebPermissionType>(delegated_permissions);
@@ -46,6 +48,7 @@ bool FrameOwnerProperties::operator==(const FrameOwnerProperties& other) const {
margin_width == other.margin_width &&
margin_height == other.margin_height &&
allow_fullscreen == other.allow_fullscreen &&
+ required_csp == other.required_csp &&
std::equal(delegated_permissions.begin(), delegated_permissions.end(),
other.delegated_permissions.begin());
}
« no previous file with comments | « content/common/frame_owner_properties.h ('k') | content/test/data/frame_owner_properties_csp.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698