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

Unified Diff: Source/core/loader/FrameLoader.cpp

Issue 1253413003: Implement referrerpolicy attribute for anchor elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update webexposed layout tests Created 5 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
« no previous file with comments | « Source/core/html/HTMLAttributeNames.in ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index ffb912ae0aadef4c4e3f2f76f2054050709cb0d2..c2f514fc7f1f11f9c3c6f75da1304e5d349d1b0b 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -705,9 +705,9 @@ void FrameLoader::setReferrerForFrameRequest(ResourceRequest& request, ShouldSen
{
if (!originDocument)
return;
- // FIXME: This should be an assertion, but there's some plugin code in the chromium repo
- // that both determines its own referrer and expects to be associated with an originDocument.
- if (!request.httpReferrer().isEmpty())
+ // Anchor elements with the 'referrerpolicy' attribute will have
+ // already set the referrer on the request.
+ if (request.didSetHTTPReferrer())
return;
if (shouldSendReferrer == NeverSendReferrer)
return;
« no previous file with comments | « Source/core/html/HTMLAttributeNames.in ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698