This reverts commit a27cfbffdfa0bf359628d2164db5b9d6321f9c9c. Reason for revert: WebRtcBrowserTest.RunsAudioVideoWebRTCCallInTwoTabsGetStatsPromise failing. Original change's description: > Fix echo return loss stats and add to RTCAudioSourceStats. > > This solves two problems: > * Echo return loss stats weren't being gathered in Chrome, because they > need to be taken from the audio processor attached to the track > rather than the audio send stream. > * The standardized location is in RTCAudioSourceStats, not > RTCMediaStreamTrackStats. For now, will populate the stats in both > locations. > > Bug: webrtc:12770 > Change-Id: I47eaf7f2b50b914a1be84156aa831e27497d07e3 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223182 > Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org> > Reviewed-by: Henrik Boström <hbos@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#34344} TBR=deadbeef@webrtc.org,hbos@webrtc.org,hbos@chromium.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com Change-Id: I6b2587d762f005adef67c0d5121f1b58c3b76688 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:12770 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223068 Reviewed-by: Evan Shrubsole <eshr@google.com> Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Evan Shrubsole <eshr@google.com> Cr-Commit-Position: refs/heads/master@{#34352}
How to write code in the api/ directory
Mostly, just follow the regular style guide, but:
- Note that
api/code is not exempt from the “.hand.ccfiles come in pairs” rule, so if you declare something inapi/path/to/foo.h, it should be defined inapi/path/to/foo.cc. - Headers in
api/should, if possible, not#includeheaders outsideapi/. It’s not always possible to avoid this, but be aware that it adds to a small mountain of technical debt that we’re trying to shrink. .ccfiles inapi/, on the other hand, are free to#includeheaders outsideapi/.
That is, the preferred way for api/ code to access non-api/ code is to call
it from a .cc file, so that users of our API headers won’t transitively
#include non-public headers.
For headers in api/ that need to refer to non-public types, forward
declarations are often a lesser evil than including non-public header files. The
usual rules still apply, though.
.cc files in api/ should preferably be kept reasonably small. If a
substantial implementation is needed, consider putting it with our non-public
code, and just call it from the api/ .cc file.