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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp

Issue 2674973006: Move parsing of referrer policy header values to SecurityPolicy (Closed)
Patch Set: 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
Index: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
index 7ea5576e8dd2e8f9f01da5ecdb21a5561fc01cec..5a9b143e36769e19e3ea4979c85d03b5183815ef 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -326,8 +326,9 @@ class TokenPreloadScanner::StartTagScanner {
match(attributeName, referrerpolicyAttr) &&
!attributeValue.isNull()) {
m_referrerPolicySet = true;
- SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords(
- attributeValue, &m_referrerPolicy);
+ SecurityPolicy::referrerPolicyFromString(
+ attributeValue, SupportReferrerPolicyLegacyKeywords,
+ &m_referrerPolicy);
}
}
@@ -359,8 +360,9 @@ class TokenPreloadScanner::StartTagScanner {
match(attributeName, referrerpolicyAttr) &&
!attributeValue.isNull()) {
m_referrerPolicySet = true;
- SecurityPolicy::referrerPolicyFromString(attributeValue,
- &m_referrerPolicy);
+ SecurityPolicy::referrerPolicyFromString(
+ attributeValue, DoNotSupportReferrerPolicyLegacyKeywords,
+ &m_referrerPolicy);
}
}
@@ -648,8 +650,9 @@ static void handleMetaReferrer(const String& attributeValue,
CSSPreloadScanner* cssScanner) {
ReferrerPolicy metaReferrerPolicy = ReferrerPolicyDefault;
if (!attributeValue.isEmpty() && !attributeValue.isNull() &&
- SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords(
- attributeValue, &metaReferrerPolicy)) {
+ SecurityPolicy::referrerPolicyFromString(
+ attributeValue, SupportReferrerPolicyLegacyKeywords,
+ &metaReferrerPolicy)) {
documentParameters->referrerPolicy = metaReferrerPolicy;
}
cssScanner->setReferrerPolicy(documentParameters->referrerPolicy);
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLinkElement.cpp ('k') | third_party/WebKit/Source/platform/weborigin/SecurityPolicy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698