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

Unified Diff: third_party/WebKit/Source/core/html/HTMLLinkElement.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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLImageElement.cpp ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
index bf6ddbec164cc586700c3cc86ac3ad4dd66ff82f..d564e57e3482b3d804ab031337dd41c3daabbf14 100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
@@ -82,8 +82,11 @@ void HTMLLinkElement::parseAttribute(
process();
} else if (name == referrerpolicyAttr) {
m_referrerPolicy = ReferrerPolicyDefault;
- if (!value.isNull())
+ if (!value.isNull()) {
SecurityPolicy::referrerPolicyFromString(value, &m_referrerPolicy);
+ UseCounter::count(document(),
+ UseCounter::HTMLLinkElementReferrerPolicyAttribute);
+ }
} else if (name == sizesAttr) {
m_sizes->setValue(value);
} else if (name == mediaAttr) {
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLImageElement.cpp ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698