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

Unified Diff: third_party/WebKit/Source/modules/mediastream/MediaStream.cpp

Issue 2081193002: Count usage of MediaStream active and inactive events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/frame/UseCounter.h ('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/modules/mediastream/MediaStream.cpp
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp b/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp
index fd3695aceb6702d7765f46d198d5138b6a5cfa65..b1b1a1907ea0c009259e610b20cff6e45e7a9df3 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp
@@ -306,6 +306,10 @@ bool MediaStream::addEventListenerInternal(const AtomicString& eventType, EventL
{
if (eventType == EventTypeNames::ended)
Deprecation::countDeprecation(getExecutionContext(), UseCounter::MediaStreamOnEnded);
+ else if (eventType == EventTypeNames::active)
+ UseCounter::count(getExecutionContext(), UseCounter::MediaStreamOnActive);
+ else if (eventType == EventTypeNames::inactive)
+ UseCounter::count(getExecutionContext(), UseCounter::MediaStreamOnInactive);
return EventTargetWithInlineData::addEventListenerInternal(eventType, listener, options);
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698