Change RTCEventLogFactory to have a const Create function
Conformant with naming rule: https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/g3doc/implementation_basics.md;l=48?q=factory%20file:md$%20file:webrtc&ss=chromium Bug: webrtc:14226 Change-Id: Ibec148fada6303e2ebdc5e6405fd527065f69d41 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266360 Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37364}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
cc7bd85748
commit
90af4c1b70
@ -27,8 +27,8 @@ RtcEventLogFactory::RtcEventLogFactory(TaskQueueFactory* task_queue_factory)
|
||||
RTC_DCHECK(task_queue_factory_);
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventLog> RtcEventLogFactory::CreateRtcEventLog(
|
||||
RtcEventLog::EncodingType encoding_type) {
|
||||
std::unique_ptr<RtcEventLog> RtcEventLogFactory::Create(
|
||||
RtcEventLog::EncodingType encoding_type) const {
|
||||
#ifdef WEBRTC_ENABLE_RTC_EVENT_LOG
|
||||
if (field_trial::IsEnabled("WebRTC-RtcEventLogKillSwitch")) {
|
||||
return std::make_unique<RtcEventLogNull>();
|
||||
@ -39,4 +39,9 @@ std::unique_ptr<RtcEventLog> RtcEventLogFactory::CreateRtcEventLog(
|
||||
#endif
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventLog> RtcEventLogFactory::CreateRtcEventLog(
|
||||
RtcEventLog::EncodingType encoding_type) {
|
||||
return Create(encoding_type);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -25,6 +25,8 @@ class RTC_EXPORT RtcEventLogFactory : public RtcEventLogFactoryInterface {
|
||||
explicit RtcEventLogFactory(TaskQueueFactory* task_queue_factory);
|
||||
~RtcEventLogFactory() override {}
|
||||
|
||||
std::unique_ptr<RtcEventLog> Create(
|
||||
RtcEventLog::EncodingType encoding_type) const override;
|
||||
std::unique_ptr<RtcEventLog> CreateRtcEventLog(
|
||||
RtcEventLog::EncodingType encoding_type) override;
|
||||
|
||||
|
||||
@ -24,7 +24,9 @@ class RtcEventLogFactoryInterface {
|
||||
public:
|
||||
virtual ~RtcEventLogFactoryInterface() = default;
|
||||
|
||||
virtual std::unique_ptr<RtcEventLog> CreateRtcEventLog(
|
||||
virtual std::unique_ptr<RtcEventLog> Create(
|
||||
RtcEventLog::EncodingType encoding_type) const = 0;
|
||||
[[deprecated]] virtual std::unique_ptr<RtcEventLog> CreateRtcEventLog(
|
||||
RtcEventLog::EncodingType encoding_type) = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user