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

Unified Diff: third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp

Issue 1978403004: Add UMA histograms for WebAudio (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/modules/webaudio/BiquadFilterNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp b/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp
index 9d6fda8af8499eea982ab6358dd81ddedece67a7..21364fe5ffc2ea4203aeec667baf04cde8d454f2 100644
--- a/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp
@@ -24,6 +24,7 @@
#include "modules/webaudio/BiquadFilterNode.h"
#include "modules/webaudio/AudioBasicProcessorHandler.h"
+#include "platform/Histogram.h"
namespace blink {
@@ -114,6 +115,9 @@ bool BiquadFilterNode::setType(unsigned type)
if (type > BiquadProcessor::Allpass)
return false;
+ DEFINE_STATIC_LOCAL(SparseHistogram, filterTypeHistogram, ("WebAudio.BiquadFilter.Type"));
+ filterTypeHistogram.sample(type);
+
getBiquadProcessor()->setType(static_cast<BiquadProcessor::FilterType>(type));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698