| Index: webrtc/logging/rtc_event_log/rtc_event_log.cc
|
| diff --git a/webrtc/logging/rtc_event_log/rtc_event_log.cc b/webrtc/logging/rtc_event_log/rtc_event_log.cc
|
| index 08464d1be7684dee0e16175f94798e54045fac29..553091a2d3d924db133b40a5f73b13001f69353c 100644
|
| --- a/webrtc/logging/rtc_event_log/rtc_event_log.cc
|
| +++ b/webrtc/logging/rtc_event_log/rtc_event_log.cc
|
| @@ -96,12 +96,10 @@ class ResourceOwningTask final : public rtc::QueuedTask {
|
| std::unique_ptr<T> resource_;
|
| std::function<void(std::unique_ptr<T>)> handler_;
|
| };
|
| -} // namespace
|
|
|
| class RtcEventLogImpl final : public RtcEventLog {
|
| - friend std::unique_ptr<RtcEventLog> RtcEventLog::Create();
|
| -
|
| public:
|
| + RtcEventLogImpl();
|
| ~RtcEventLogImpl() override;
|
|
|
| bool StartLogging(const std::string& file_name,
|
| @@ -143,8 +141,6 @@ class RtcEventLogImpl final : public RtcEventLog {
|
| void StartLoggingInternal(std::unique_ptr<FileWrapper> file,
|
| int64_t max_size_bytes);
|
|
|
| - RtcEventLogImpl(); // Creation is done by RtcEventLog::Create.
|
| -
|
| void StoreEvent(std::unique_ptr<rtclog::Event> event);
|
| void LogProbeResult(int id,
|
| rtclog::BweProbeResult::ResultType result,
|
| @@ -186,11 +182,6 @@ class RtcEventLogImpl final : public RtcEventLog {
|
| RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogImpl);
|
| };
|
|
|
| -namespace {
|
| -// The functions in this namespace convert enums from the runtime format
|
| -// that the rest of the WebRtc project can use, to the corresponding
|
| -// serialized enum which is defined by the protobuf.
|
| -
|
| rtclog::VideoReceiveConfig_RtcpMode ConvertRtcpMode(RtcpMode rtcp_mode) {
|
| switch (rtcp_mode) {
|
| case RtcpMode::kCompound:
|
| @@ -816,9 +807,9 @@ std::unique_ptr<RtcEventLog> RtcEventLog::Create() {
|
| LOG(LS_WARNING) << "Denied creation of additional WebRTC event logs. "
|
| << count - 1 << " logs open already.";
|
| std::atomic_fetch_sub(&rtc_event_log_count, 1);
|
| - return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl());
|
| + return CreateNull();
|
| }
|
| - return std::unique_ptr<RtcEventLog>(new RtcEventLogImpl());
|
| + return rtc::MakeUnique<RtcEventLogImpl>();
|
| #else
|
| return CreateNull();
|
| #endif // ENABLE_RTC_EVENT_LOG
|
|
|