field_trial_units.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. #include "api/units/data_rate.h"
  13. #include "api/units/data_size.h"
  14. #include "api/units/time_delta.h"
  15. #include "rtc_base/experiments/field_trial_parser.h"
  16. namespace webrtc {
  17. template <>
  18. absl::optional<DataRate> ParseTypedParameter<DataRate>(std::string str);
  19. template <>
  20. absl::optional<DataSize> ParseTypedParameter<DataSize>(std::string str);
  21. template <>
  22. absl::optional<TimeDelta> ParseTypedParameter<TimeDelta>(std::string str);
  23. extern template class FieldTrialParameter<DataRate>;
  24. extern template class FieldTrialParameter<DataSize>;
  25. extern template class FieldTrialParameter<TimeDelta>;
  26. extern template class FieldTrialConstrained<DataRate>;
  27. extern template class FieldTrialConstrained<DataSize>;
  28. extern template class FieldTrialConstrained<TimeDelta>;
  29. extern template class FieldTrialOptional<DataRate>;
  30. extern template class FieldTrialOptional<DataSize>;
  31. extern template class FieldTrialOptional<TimeDelta>;
  32. } // namespace webrtc
  33. #endif // RTC_BASE_EXPERIMENTS_FIELD_TRIAL_UNITS_H_