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

Side by Side 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, 9 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/blink_platform_impl.h" 5 #include "content/child/blink_platform_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 const blink::WebParsedFeaturePolicyHeader& container_policy, 856 const blink::WebParsedFeaturePolicyHeader& container_policy,
857 const blink::WebParsedFeaturePolicyHeader& policy_header, 857 const blink::WebParsedFeaturePolicyHeader& policy_header,
858 const blink::WebSecurityOrigin& origin) { 858 const blink::WebSecurityOrigin& origin) {
859 std::unique_ptr<FeaturePolicy> policy = FeaturePolicy::CreateFromParentPolicy( 859 std::unique_ptr<FeaturePolicy> policy = FeaturePolicy::CreateFromParentPolicy(
860 static_cast<const FeaturePolicy*>(parent_policy), 860 static_cast<const FeaturePolicy*>(parent_policy),
861 FeaturePolicyHeaderFromWeb(container_policy), url::Origin(origin)); 861 FeaturePolicyHeaderFromWeb(container_policy), url::Origin(origin));
862 policy->SetHeaderPolicy(FeaturePolicyHeaderFromWeb(policy_header)); 862 policy->SetHeaderPolicy(FeaturePolicyHeaderFromWeb(policy_header));
863 return policy.release(); 863 return policy.release();
864 } 864 }
865 865
866 void BlinkPlatformImpl::resetFeaturePolicyOrigin( 866 blink::WebFeaturePolicy* BlinkPlatformImpl::duplicateFeaturePolicyWithOrigin(
867 blink::WebFeaturePolicy* policy, 867 const blink::WebFeaturePolicy& policy,
868 const blink::WebSecurityOrigin& origin) { 868 const blink::WebSecurityOrigin& new_origin) {
869 static_cast<FeaturePolicy*>(policy)->ResetOrigin(url::Origin(origin)); 869 std::unique_ptr<FeaturePolicy> new_policy =
870 FeaturePolicy::CreateFromPolicyWithOrigin(
871 static_cast<const FeaturePolicy&>(policy), url::Origin(new_origin));
872 return new_policy.release();
870 } 873 }
871 874
872 } // namespace content 875 } // namespace content
OLDNEW
« 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