diff options
Diffstat (limited to 'third_party/libwebrtc/rtc_base/experiments')
3 files changed, 11 insertions, 23 deletions
diff --git a/third_party/libwebrtc/rtc_base/experiments/BUILD.gn b/third_party/libwebrtc/rtc_base/experiments/BUILD.gn index 185d5931f7..d44eefd4fc 100644 --- a/third_party/libwebrtc/rtc_base/experiments/BUILD.gn +++ b/third_party/libwebrtc/rtc_base/experiments/BUILD.gn @@ -16,10 +16,9 @@ rtc_library("alr_experiment") { deps = [ "..:logging", "../../api:field_trials_view", - "../../api/transport:field_trial_based_config", ] absl_deps = [ - "//third_party/abseil-cpp/absl/strings:strings", + "//third_party/abseil-cpp/absl/strings:string_view", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/third_party/libwebrtc/rtc_base/experiments/alr_experiment.cc b/third_party/libwebrtc/rtc_base/experiments/alr_experiment.cc index f5d36f6867..5370de5452 100644 --- a/third_party/libwebrtc/rtc_base/experiments/alr_experiment.cc +++ b/third_party/libwebrtc/rtc_base/experiments/alr_experiment.cc @@ -16,21 +16,16 @@ #include <string> #include "absl/strings/string_view.h" -#include "api/transport/field_trial_based_config.h" +#include "api/field_trials_view.h" #include "rtc_base/logging.h" namespace webrtc { +namespace { -const char AlrExperimentSettings::kScreenshareProbingBweExperimentName[] = - "WebRTC-ProbingScreenshareBwe"; -const char AlrExperimentSettings::kStrictPacingAndProbingExperimentName[] = - "WebRTC-StrictPacingAndProbing"; -const char kDefaultProbingScreenshareBweSettings[] = "1.0,2875,80,40,-60,3"; +constexpr absl::string_view kDefaultProbingScreenshareBweSettings = + "1.0,2875,80,40,-60,3"; -bool AlrExperimentSettings::MaxOneFieldTrialEnabled() { - return AlrExperimentSettings::MaxOneFieldTrialEnabled( - FieldTrialBasedConfig()); -} +} // namespace bool AlrExperimentSettings::MaxOneFieldTrialEnabled( const FieldTrialsView& key_value_config) { @@ -40,12 +35,6 @@ bool AlrExperimentSettings::MaxOneFieldTrialEnabled( } absl::optional<AlrExperimentSettings> -AlrExperimentSettings::CreateFromFieldTrial(absl::string_view experiment_name) { - return AlrExperimentSettings::CreateFromFieldTrial(FieldTrialBasedConfig(), - experiment_name); -} - -absl::optional<AlrExperimentSettings> AlrExperimentSettings::CreateFromFieldTrial( const FieldTrialsView& key_value_config, absl::string_view experiment_name) { diff --git a/third_party/libwebrtc/rtc_base/experiments/alr_experiment.h b/third_party/libwebrtc/rtc_base/experiments/alr_experiment.h index 048fd90cab..9914828827 100644 --- a/third_party/libwebrtc/rtc_base/experiments/alr_experiment.h +++ b/third_party/libwebrtc/rtc_base/experiments/alr_experiment.h @@ -30,14 +30,14 @@ struct AlrExperimentSettings { // reserved value to indicate absence of experiment. int group_id; - static const char kScreenshareProbingBweExperimentName[]; - static const char kStrictPacingAndProbingExperimentName[]; - static absl::optional<AlrExperimentSettings> CreateFromFieldTrial( - absl::string_view experiment_name); + static constexpr absl::string_view kScreenshareProbingBweExperimentName = + "WebRTC-ProbingScreenshareBwe"; + static constexpr absl::string_view kStrictPacingAndProbingExperimentName = + "WebRTC-StrictPacingAndProbing"; + static absl::optional<AlrExperimentSettings> CreateFromFieldTrial( const FieldTrialsView& key_value_config, absl::string_view experiment_name); - static bool MaxOneFieldTrialEnabled(); static bool MaxOneFieldTrialEnabled(const FieldTrialsView& key_value_config); private: |