1 /* 2 * Copyright 2018 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 #ifndef RTC_BASE_EXPERIMENTS_FIELD_TRIAL_UNITS_H_ 11 #define RTC_BASE_EXPERIMENTS_FIELD_TRIAL_UNITS_H_ 12 13 #include "absl/strings/string_view.h" 14 #include "api/units/data_rate.h" 15 #include "api/units/data_size.h" 16 #include "api/units/time_delta.h" 17 #include "rtc_base/experiments/field_trial_parser.h" 18 19 namespace webrtc { 20 21 template <> 22 absl::optional<DataRate> ParseTypedParameter<DataRate>(absl::string_view str); 23 template <> 24 absl::optional<DataSize> ParseTypedParameter<DataSize>(absl::string_view str); 25 template <> 26 absl::optional<TimeDelta> ParseTypedParameter<TimeDelta>(absl::string_view str); 27 28 extern template class FieldTrialParameter<DataRate>; 29 extern template class FieldTrialParameter<DataSize>; 30 extern template class FieldTrialParameter<TimeDelta>; 31 32 extern template class FieldTrialConstrained<DataRate>; 33 extern template class FieldTrialConstrained<DataSize>; 34 extern template class FieldTrialConstrained<TimeDelta>; 35 36 extern template class FieldTrialOptional<DataRate>; 37 extern template class FieldTrialOptional<DataSize>; 38 extern template class FieldTrialOptional<TimeDelta>; 39 } // namespace webrtc 40 41 #endif // RTC_BASE_EXPERIMENTS_FIELD_TRIAL_UNITS_H_ 42