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

Unified Diff: content/child/feature_policy/feature_policy_platform.cc

Issue 2727803004: Replace string by enum in WebParsedFeaturePolicyDeclaration#feature (Closed)
Patch Set: Codereview: nit -- add comments to introduce features 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('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/feature_policy/feature_policy_platform.cc
diff --git a/content/child/feature_policy/feature_policy_platform.cc b/content/child/feature_policy/feature_policy_platform.cc
index 1a1b81d13d501708b52c755fcbb5cce90449df6e..3b2b062ecf17b4e0ffeea4d9b3927e5897651228 100644
--- a/content/child/feature_policy/feature_policy_platform.cc
+++ b/content/child/feature_policy/feature_policy_platform.cc
@@ -12,7 +12,7 @@ ParsedFeaturePolicyHeader FeaturePolicyHeaderFromWeb(
for (const blink::WebParsedFeaturePolicyDeclaration& web_declaration :
web_feature_policy_header) {
ParsedFeaturePolicyDeclaration declaration;
- declaration.feature_name = web_declaration.featureName.utf8();
+ declaration.feature = web_declaration.feature;
declaration.matches_all_origins = web_declaration.matchesAllOrigins;
for (const blink::WebSecurityOrigin& web_origin : web_declaration.origins)
declaration.origins.push_back(web_origin);
@@ -27,8 +27,7 @@ blink::WebParsedFeaturePolicy FeaturePolicyHeaderToWeb(
for (const ParsedFeaturePolicyDeclaration& declaration :
feature_policy_header) {
blink::WebParsedFeaturePolicyDeclaration web_declaration;
- web_declaration.featureName =
- blink::WebString::fromUTF8(declaration.feature_name);
+ web_declaration.feature = declaration.feature;
web_declaration.matchesAllOrigins = declaration.matches_all_origins;
std::vector<blink::WebSecurityOrigin> web_origins;
for (const url::Origin& origin : declaration.origins)
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/common/feature_policy/feature_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698