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

Unified Diff: third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp

Issue 2628613002: Add UseCounters for referrerpolicy attributes (Closed)
Patch Set: Created 3 years, 11 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/HTMLAnchorElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp b/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
index 790628cb60d15a2d56a1d2318cc1564535388722..a9e0f523c9c90219c473085048e2b0ec84c4d010 100644
--- a/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
@@ -416,6 +416,8 @@ void HTMLAnchorElement::handleClick(Event* event) {
SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords(
fastGetAttribute(referrerpolicyAttr), &policy) &&
!hasRel(RelationNoReferrer)) {
+ UseCounter::count(document(),
+ UseCounter::HTMLAnchorElementReferrerPolicyAttribute);
request.setHTTPReferrer(SecurityPolicy::generateReferrer(
policy, completedURL, document().outgoingReferrer()));
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698