Use the sparse histogram in RTC_HISTOGRAM_ENUMERATION_SPARSE.

A stub of sparse histogram factory getter is added so that Chromium can
provide an implementation using base::SparseHistogram for the metrics
macro RTC_HISTOGRAM_ENUMERATION_SPARSE. The default implementation in
WebRTC reuses the non-sparse version.

Bug: None
Change-Id: Ia091ca7aaacb6baa92027cd99d821bbc8da8d780
Reviewed-on: https://webrtc-review.googlesource.com/85740
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#23750}
diff --git a/system_wrappers/source/metrics_default.cc b/system_wrappers/source/metrics_default.cc
index fbb2956..7b62c81 100644
--- a/system_wrappers/source/metrics_default.cc
+++ b/system_wrappers/source/metrics_default.cc
@@ -247,6 +247,12 @@
   return map->GetEnumerationHistogram(name, boundary);
 }
 
+// Our default implementation reuses the non-sparse histogram.
+Histogram* SparseHistogramFactoryGetEnumeration(const std::string& name,
+                                                int boundary) {
+  return HistogramFactoryGetEnumeration(name, boundary);
+}
+
 // Fast path. Adds |sample| to cached |histogram_pointer|.
 void HistogramAdd(Histogram* histogram_pointer, int sample) {
   RtcHistogram* ptr = reinterpret_cast<RtcHistogram*>(histogram_pointer);