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

Unified Diff: Source/core/dom/Document.cpp

Issue 607433002: Referrer Policy: Update <meta name="referrer"> values to match the spec. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tests. Created 6 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
« no previous file with comments | « LayoutTests/http/tests/security/referrer-policy-no-referrer-when-downgrade-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 56daf3fa7c175de830ec03d437b239fb96797b3a..0c8dd5775cfb7e8e033bb5d0401ba600ce0c9690 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3162,16 +3162,16 @@ void Document::processReferrerPolicy(const String& policy)
{
ASSERT(!policy.isNull());
- if (equalIgnoringCase(policy, "never")) {
+ if (equalIgnoringCase(policy, "no-referrer") || equalIgnoringCase(policy, "never")) {
setReferrerPolicy(ReferrerPolicyNever);
- } else if (equalIgnoringCase(policy, "always")) {
+ } else if (equalIgnoringCase(policy, "unsafe-url") || equalIgnoringCase(policy, "always")) {
setReferrerPolicy(ReferrerPolicyAlways);
} else if (equalIgnoringCase(policy, "origin")) {
setReferrerPolicy(ReferrerPolicyOrigin);
- } else if (equalIgnoringCase(policy, "default")) {
+ } else if (equalIgnoringCase(policy, "no-referrer-when-downgrade") || equalIgnoringCase(policy, "default")) {
setReferrerPolicy(ReferrerPolicyDefault);
} else {
- addConsoleMessage(ConsoleMessage::create(RenderingMessageSource, ErrorMessageLevel, "Failed to set referrer policy: The value '" + policy + "' is not one of 'always', 'default', 'never', or 'origin'. Defaulting to 'never'."));
+ addConsoleMessage(ConsoleMessage::create(RenderingMessageSource, ErrorMessageLevel, "Failed to set referrer policy: The value '" + policy + "' is not one of 'no-referrer', 'origin', 'no-referrer-when-downgrade', or 'unsafe-url'. Defaulting to 'no-referrer'."));
setReferrerPolicy(ReferrerPolicyNever);
}
}
« no previous file with comments | « LayoutTests/http/tests/security/referrer-policy-no-referrer-when-downgrade-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698