Adds getter for FieldTrialParameter keys.
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}
diff --git a/rtc_base/experiments/field_trial_parser.h b/rtc_base/experiments/field_trial_parser.h
index a63cb20..73b6ca8 100644
--- a/rtc_base/experiments/field_trial_parser.h
+++ b/rtc_base/experiments/field_trial_parser.h
@@ -38,6 +38,7 @@
class FieldTrialParameterInterface {
public:
virtual ~FieldTrialParameterInterface();
+ std::string key() const { return key_; }
protected:
// Protected to allow implementations to provide assignment and copy.
@@ -55,9 +56,8 @@
std::vector<FieldTrialParameterInterface*> sub_parameters_;
- std::string key_;
-
private:
+ std::string key_;
bool used_ = false;
};