This is useful in test tooling.
Bug: webrtc:9346
Change-Id: I4a2ac52927cfe72f392f8748d3bada1e88db1b6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134209
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27786}
List elements are separated by a |. If the key is given without a : we
treat that as a empty list.
We also support parsing multiple lists as a list-of-structs, see the
unit test for usage examples.
Bug: webrtc:9346
Change-Id: I32d3ce612fef476b1c481c00a893d7fa2f339e92
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130464
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27560}
This is useful in tests as it allows overriding the default after
construction. It's not intended for use in production (as it can
be confusing to readers).
Bug: webrtc:10365
Change-Id: I8ac2541f2626e7fddbb61bdae72e9571ce9d7b97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130468
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27389}
Implicit bool conversions behave wierdly in a bunch of cases, so let's make it explicit.
Bug: None
Change-Id: I15933e90d57c57218eed9608407aace5a640a6ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127284
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27076}
This adds a dcheck to detect if a FieldTrialParameter has been created
but not used in parsing a field trial. This is an easy mistake to make
and cause extra work debugging why nothing happens.
Also improving the ergonomics of using the parameter and optional
classes. Making it easier to use them as drop in replacements for their
underlying classes. In particular, the optional parameter class
implements and interface more similar to the optional class.
Bug: webrtc:9510
Change-Id: I5a12dd66396fa4cac9c9cf517172ae2f06984060
Reviewed-on: https://webrtc-review.googlesource.com/96761
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24527}
Removed the need to create a custom parser function and reuses some of
the code to reduce binary overhead of enums.
Bug: webrtc:9346
Change-Id: I51c9da713ed5456a86a2afbcf0991477bb83b894
Reviewed-on: https://webrtc-review.googlesource.com/83623
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23752}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script with parameter 'rtc_base'
Then manually fix where Optional was used without rtc prefix (patchset#3)
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: I825f80cc8089747876ba6316d9e7c30e05716974
Reviewed-on: https://webrtc-review.googlesource.com/84585
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23700}