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

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

Issue 2278823004: Stop supporting legacy keywords in Referrer-Policy header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jochen comment Created 4 years, 4 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 5d6166b3d1e7e655d15cc6aa46df964a4c99c12f..ff0f8d589c21b4f8857b0054e40f732678298127 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -298,7 +298,7 @@ private:
}
} else if (!m_referrerPolicySet && match(attributeName, referrerpolicyAttr) && !attributeValue.isNull()) {
m_referrerPolicySet = true;
- SecurityPolicy::referrerPolicyFromString(attributeValue, &m_referrerPolicy);
+ SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords(attributeValue, &m_referrerPolicy);
}
}
@@ -561,7 +561,7 @@ static void handleMetaViewport(const String& attributeValue, const CachedDocumen
static void handleMetaReferrer(const String& attributeValue, CachedDocumentParameters* documentParameters, CSSPreloadScanner* cssScanner)
{
ReferrerPolicy metaReferrerPolicy = ReferrerPolicyDefault;
- if (!attributeValue.isEmpty() && !attributeValue.isNull() && SecurityPolicy::referrerPolicyFromString(attributeValue, &metaReferrerPolicy)) {
+ if (!attributeValue.isEmpty() && !attributeValue.isNull() && SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords(attributeValue, &metaReferrerPolicy)) {
documentParameters->referrerPolicy = metaReferrerPolicy;
}
cssScanner->setReferrerPolicy(documentParameters->referrerPolicy);

Powered by Google App Engine
This is Rietveld 408576698