Add kill-switch to RTC event log factory.
Bug: webrtc:12084 Change-Id: Iac2c05b59a20e272fe302a5580357f6f141dc328 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190983 Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org> Reviewed-by: Elad Alon <eladalon@webrtc.org> Commit-Queue: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32558}
This commit is contained in:

committed by
Commit Bot

parent
ce9d763302
commit
5481784385
@ -37,6 +37,7 @@ rtc_library("rtc_event_log_factory") {
|
||||
":rtc_event_log",
|
||||
"../../rtc_base:checks",
|
||||
"../../rtc_base/system:rtc_export",
|
||||
"../../system_wrappers:field_trial",
|
||||
"../task_queue",
|
||||
]
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "rtc_base/checks.h"
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
|
||||
#ifdef WEBRTC_ENABLE_RTC_EVENT_LOG
|
||||
#include "logging/rtc_event_log/rtc_event_log_impl.h"
|
||||
@ -29,6 +30,9 @@ RtcEventLogFactory::RtcEventLogFactory(TaskQueueFactory* task_queue_factory)
|
||||
std::unique_ptr<RtcEventLog> RtcEventLogFactory::CreateRtcEventLog(
|
||||
RtcEventLog::EncodingType encoding_type) {
|
||||
#ifdef WEBRTC_ENABLE_RTC_EVENT_LOG
|
||||
if (field_trial::IsEnabled("WebRTC-RtcEventLogKillSwitch")) {
|
||||
return std::make_unique<RtcEventLogNull>();
|
||||
}
|
||||
return std::make_unique<RtcEventLogImpl>(encoding_type, task_queue_factory_);
|
||||
#else
|
||||
return std::make_unique<RtcEventLogNull>();
|
||||
|
Reference in New Issue
Block a user