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
@ -17,11 +17,17 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
std::unique_ptr<RtcEventLog> FakeRtcEventLogFactory::CreateRtcEventLog(
|
||||
RtcEventLog::EncodingType /*encoding_type*/) {
|
||||
std::unique_ptr<RtcEventLog> FakeRtcEventLogFactory::Create(
|
||||
RtcEventLog::EncodingType /*encoding_type*/) const {
|
||||
auto fake_event_log = std::make_unique<FakeRtcEventLog>();
|
||||
last_log_created_ = fake_event_log.get();
|
||||
const_cast<FakeRtcEventLogFactory*>(this)->last_log_created_ =
|
||||
fake_event_log.get();
|
||||
return fake_event_log;
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventLog> FakeRtcEventLogFactory::CreateRtcEventLog(
|
||||
RtcEventLog::EncodingType encoding_type) {
|
||||
return Create(encoding_type);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -23,6 +23,9 @@ class FakeRtcEventLogFactory : public RtcEventLogFactoryInterface {
|
||||
FakeRtcEventLogFactory() = default;
|
||||
~FakeRtcEventLogFactory() override = default;
|
||||
|
||||
std::unique_ptr<RtcEventLog> Create(
|
||||
RtcEventLog::EncodingType encoding_type) const override;
|
||||
|
||||
std::unique_ptr<RtcEventLog> CreateRtcEventLog(
|
||||
RtcEventLog::EncodingType encoding_type) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user