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

Unified Diff: content/renderer/render_frame_proxy.cc

Issue 2648423002: Rename feature policy classes. (Closed)
Patch Set: Rebase Created 3 years, 11 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/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/dom/SecurityContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_proxy.cc
diff --git a/content/renderer/render_frame_proxy.cc b/content/renderer/render_frame_proxy.cc
index 843f030d952016852709f69a44b0fccf1cb35645..ed11ec780ec49a325d733bc37cdf8ae7c8c6eb5c 100644
--- a/content/renderer/render_frame_proxy.cc
+++ b/content/renderer/render_frame_proxy.cc
@@ -49,19 +49,19 @@ static base::LazyInstance<RoutingIDProxyMap> g_routing_id_proxy_map =
typedef std::map<blink::WebFrame*, RenderFrameProxy*> FrameMap;
base::LazyInstance<FrameMap> g_frame_map = LAZY_INSTANCE_INITIALIZER;
-blink::WebParsedFeaturePolicy ToWebParsedFeaturePolicy(
- const ParsedFeaturePolicy& parsed_whitelists) {
- std::vector<blink::WebFeaturePolicy::ParsedWhitelist> result;
- for (const FeaturePolicyParsedWhitelist& whitelist : parsed_whitelists) {
- blink::WebFeaturePolicy::ParsedWhitelist web_whitelist;
- web_whitelist.featureName =
- blink::WebString::fromUTF8(whitelist.feature_name);
- web_whitelist.matchesAllOrigins = whitelist.matches_all_origins;
+blink::WebParsedFeaturePolicyHeader ToWebParsedFeaturePolicyHeader(
+ const ParsedFeaturePolicyHeader& parsed_header) {
+ std::vector<blink::WebParsedFeaturePolicyDeclaration> result;
+ for (const ParsedFeaturePolicyDeclaration& declaration : parsed_header) {
+ blink::WebParsedFeaturePolicyDeclaration web_declaration;
+ web_declaration.featureName =
+ blink::WebString::fromUTF8(declaration.feature_name);
+ web_declaration.matchesAllOrigins = declaration.matches_all_origins;
std::vector<blink::WebSecurityOrigin> web_origins;
- for (const url::Origin& origin : whitelist.origins)
+ for (const url::Origin& origin : declaration.origins)
web_origins.push_back(origin);
- web_whitelist.origins = web_origins;
- result.push_back(web_whitelist);
+ web_declaration.origins = web_origins;
+ result.push_back(web_declaration);
}
return result;
}
@@ -241,7 +241,7 @@ void RenderFrameProxy::SetReplicatedState(const FrameReplicationState& state) {
web_frame_->setReplicatedPotentiallyTrustworthyUniqueOrigin(
state.has_potentially_trustworthy_unique_origin);
web_frame_->setReplicatedFeaturePolicyHeader(
- ToWebParsedFeaturePolicy(state.feature_policy_header));
+ ToWebParsedFeaturePolicyHeader(state.feature_policy_header));
if (state.has_received_user_gesture)
web_frame_->setHasReceivedUserGesture();
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/dom/SecurityContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698