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

Unified Diff: third_party/WebKit/Source/core/html/HTMLIFrameElement.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/HTMLIFrameElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp b/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
index 5f44a25840433092f131e9be0c6253a3b080c8b9..6f13781c84c15f403811150eaae2479a0c74c964 100644
--- a/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
@@ -113,9 +113,12 @@ void HTMLIFrameElement::parseAttribute(
UseCounter::count(document(), UseCounter::SandboxViaIFrame);
} else if (name == referrerpolicyAttr) {
m_referrerPolicy = ReferrerPolicyDefault;
- if (!value.isNull())
+ if (!value.isNull()) {
SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords(
value, &m_referrerPolicy);
+ UseCounter::count(document(),
+ UseCounter::HTMLIFrameElementReferrerPolicyAttribute);
+ }
} else if (name == allowfullscreenAttr) {
bool oldAllowFullscreen = m_allowFullscreen;
m_allowFullscreen = !value.isNull();
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698