[stats] Mark codec implementation stats as exposing hardware capability

This means that these stats will be filtered out by JavaScript unless
the conditions for exposing hardware capabilities are met. These
conditions are described in the webrtc-stats spec at
https://w3c.github.io/webrtc-stats/#limiting-exposure-of-hardware-capabilities.

R=hbos@webrtc.org

Bug: chromium:1369050,chromium:1369049
Change-Id: I05bdb72ef6789417488c7e786e8713ce99a91f8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279960
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38594}
diff --git a/api/stats/rtcstats_objects.h b/api/stats/rtcstats_objects.h
index 42553c1..6f81784 100644
--- a/api/stats/rtcstats_objects.h
+++ b/api/stats/rtcstats_objects.h
@@ -483,7 +483,9 @@
   RTCStatsMember<double> estimated_playout_timestamp;
   // Only implemented for video.
   // TODO(https://crbug.com/webrtc/14178): Also implement for audio.
-  RTCStatsMember<std::string> decoder_implementation;
+  RTCRestrictedStatsMember<std::string,
+                           StatExposureCriteria::kHardwareCapability>
+      decoder_implementation;
   // FIR and PLI counts are only defined for |kind == "video"|.
   RTCStatsMember<uint32_t> fir_count;
   RTCStatsMember<uint32_t> pli_count;
@@ -548,7 +550,9 @@
   RTCStatsMember<std::string> content_type;
   // Only implemented for video.
   // TODO(https://crbug.com/webrtc/14178): Implement for audio as well.
-  RTCStatsMember<std::string> encoder_implementation;
+  RTCRestrictedStatsMember<std::string,
+                           StatExposureCriteria::kHardwareCapability>
+      encoder_implementation;
   // FIR and PLI counts are only defined for |kind == "video"|.
   RTCStatsMember<uint32_t> fir_count;
   RTCStatsMember<uint32_t> pli_count;