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

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

Issue 2424943002: Add ReferrerPolicy support to preload (Closed)
Patch Set: Created 4 years, 2 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 8884bdda02babbf08b12cce11402e8f9fc123491..202385a00114e8f293e1b4c927a2b6b9eb95b6f3 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -357,6 +357,12 @@ class TokenPreloadScanner::StartTagScanner {
} else if (match(attributeName, typeAttr)) {
m_matched &= MIMETypeRegistry::isSupportedStyleSheetMIMEType(
ContentType(attributeValue).type());
+ } else if (!m_referrerPolicySet &&
+ match(attributeName, referrerpolicyAttr) &&
+ !attributeValue.isNull()) {
+ m_referrerPolicySet = true;
+ SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords(
+ attributeValue, &m_referrerPolicy);
}
}

Powered by Google App Engine
This is Rietveld 408576698