deprecated_global_field_trials.h (1193B)
1 /* 2 * Copyright 2019 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 API_ENVIRONMENT_DEPRECATED_GLOBAL_FIELD_TRIALS_H_ 11 #define API_ENVIRONMENT_DEPRECATED_GLOBAL_FIELD_TRIALS_H_ 12 13 #include <memory> 14 #include <string> 15 16 #include "absl/strings/string_view.h" 17 #include "api/field_trials_registry.h" 18 19 namespace webrtc { 20 // TODO: bugs.webrtc.org/42220378 - Delete after January 1, 2026 when functions 21 // to set global field trials are deleted. 22 class DeprecatedGlobalFieldTrials : public FieldTrialsRegistry { 23 public: 24 static void Set(const char* field_trials); 25 26 std::unique_ptr<FieldTrialsView> CreateCopy() const override { 27 return std::make_unique<DeprecatedGlobalFieldTrials>(); 28 } 29 30 private: 31 std::string GetValue(absl::string_view key) const override; 32 }; 33 } // namespace webrtc 34 35 #endif // API_ENVIRONMENT_DEPRECATED_GLOBAL_FIELD_TRIALS_H_