
This reverts commit 591b2ab82ead157b5f5a85d5082bd15fe8c51809. Reason for revert: Breaks downstream project Original change's description: > Wires up WebrtcKeyValueBasedConfig in media engines. > > This replaces field_trial:: -based functions from system_wrappers. > Field trials are still used as fallback, but injectable trials are now > possible. > > Bug: webrtc:11926 > Change-Id: I70f28c4fbabf6d9e55052342000e38612b46682c > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174261 > Reviewed-by: Per Kjellander <perkj@webrtc.org> > Reviewed-by: Kári Helgason <kthelgason@webrtc.org> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> > Reviewed-by: Stefan Holmer <stefan@webrtc.org> > Reviewed-by: Sebastian Jansson <srte@webrtc.org> > Commit-Queue: Erik Språng <sprang@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#32129} TBR=mbonadei@webrtc.org,kthelgason@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,perkj@webrtc.org Change-Id: I3e169149a8b787aa6366bb357abb71794534c63a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:11926 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184507 Reviewed-by: Artem Titov <titovartem@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32132}
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 “.h
and.cc
files 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#include
headers 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. .cc
files inapi/
, on the other hand, are free to#include
headers 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.