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

Unified Diff: content/child/blink_platform_impl.cc

Issue 2729623003: TEST ONLY: Duplicate FP rather than modifying in place (Closed)
Patch Set: Rebase against parent CL 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
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | content/common/feature_policy/feature_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/blink_platform_impl.cc
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index 0bba73a40c6ac1a1ae4aab33a4a1702a48425798..0b41bff1199ca0e08cb56193556e4d79a0bf3cbe 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -863,10 +863,13 @@ blink::WebFeaturePolicy* BlinkPlatformImpl::createFeaturePolicy(
return policy.release();
}
-void BlinkPlatformImpl::resetFeaturePolicyOrigin(
- blink::WebFeaturePolicy* policy,
- const blink::WebSecurityOrigin& origin) {
- static_cast<FeaturePolicy*>(policy)->ResetOrigin(url::Origin(origin));
+blink::WebFeaturePolicy* BlinkPlatformImpl::duplicateFeaturePolicyWithOrigin(
+ const blink::WebFeaturePolicy& policy,
+ const blink::WebSecurityOrigin& new_origin) {
+ std::unique_ptr<FeaturePolicy> new_policy =
+ FeaturePolicy::CreateFromPolicyWithOrigin(
+ static_cast<const FeaturePolicy&>(policy), url::Origin(new_origin));
+ return new_policy.release();
}
} // namespace content
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | content/common/feature_policy/feature_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698