Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp |
| diff --git a/third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp b/third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp |
| index 5fc56a2b056e249db05da4372a308268df3abefd..d08059cdb9825206a3cb180b7659ae1a3b042b22 100644 |
| --- a/third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp |
| +++ b/third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp |
| @@ -74,6 +74,18 @@ void AutoplayUmaHelper::onAutoplayInitiated(AutoplaySource source) { |
| audioHistogram.count(static_cast<int>(m_source)); |
| } |
| + // Record the child frame and top-level frame URLs for autoplay muted videos |
| + // by attribute. |
| + if (m_elemnet->isHTMLVideoElement() && m_element->muted() && |
| + source == AutoplaySource::Attribute) { |
| + Platform::current()->recordRapporURL( |
| + "Media.Video.Autoplay.Muted.Attribute.ChildFrame", |
| + m_element->document().url()); |
| + Platform::current()->recordRapporURL( |
| + "Media.Video.Autoplay.Muted.Attribute.TopLevelFrame", |
| + m_element->document().topDocument().url()); |
|
mlamouri (slow - plz ping)
2017/02/20 11:23:43
FWIW, I'm not sure if that's the right thing to do
Zhiqiang Zhang (Slow)
2017/02/20 17:49:43
Maybe we just don't record the top-level frames at
|
| + } |
| + |
| // Record if it will be blocked by Data Saver or Autoplay setting. |
| if (m_element->isHTMLVideoElement() && m_element->muted() && |
| RuntimeEnabledFeatures::autoplayMutedVideosEnabled()) { |