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

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

Issue 2424943002: Add ReferrerPolicy support to preload (Closed)
Patch Set: Test fix 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 b664912074081ba5a020b8c0980045d2d856b970..ba3c1cba895ed57d4d7f80c7997760dbf9ce781d 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -356,6 +356,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::referrerPolicyFromString(attributeValue,
+ &m_referrerPolicy);
}
}

Powered by Google App Engine
This is Rietveld 408576698