diff options
Diffstat (limited to '')
-rw-r--r-- | third_party/libwebrtc/logging/rtc_event_log/rtc_event_log_impl.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/third_party/libwebrtc/logging/rtc_event_log/rtc_event_log_impl.h b/third_party/libwebrtc/logging/rtc_event_log/rtc_event_log_impl.h index 3187a7fe87..2c4ef8d7ed 100644 --- a/third_party/libwebrtc/logging/rtc_event_log/rtc_event_log_impl.h +++ b/third_party/libwebrtc/logging/rtc_event_log/rtc_event_log_impl.h @@ -18,14 +18,15 @@ #include <string> #include "absl/strings/string_view.h" +#include "api/environment/environment.h" #include "api/rtc_event_log/rtc_event.h" #include "api/rtc_event_log/rtc_event_log.h" #include "api/rtc_event_log_output.h" #include "api/sequence_checker.h" +#include "api/task_queue/task_queue_base.h" #include "api/task_queue/task_queue_factory.h" #include "logging/rtc_event_log/encoder/rtc_event_log_encoder.h" #include "rtc_base/system/no_unique_address.h" -#include "rtc_base/task_queue.h" #include "rtc_base/thread_annotations.h" namespace webrtc { @@ -39,6 +40,7 @@ class RtcEventLogImpl final : public RtcEventLog { // bound to prevent an attack via unreasonable memory use. static constexpr size_t kMaxEventsInConfigHistory = 1000; + explicit RtcEventLogImpl(const Environment& env); RtcEventLogImpl( std::unique_ptr<RtcEventLogEncoder> encoder, TaskQueueFactory* task_queue_factory, @@ -49,9 +51,6 @@ class RtcEventLogImpl final : public RtcEventLog { ~RtcEventLogImpl() override; - static std::unique_ptr<RtcEventLogEncoder> CreateEncoder( - EncodingType encoding_type); - // TODO(eladalon): We should change these name to reflect that what we're // actually starting/stopping is the output of the log, not the log itself. bool StartLogging(std::unique_ptr<RtcEventLogOutput> output, @@ -114,11 +113,7 @@ class RtcEventLogImpl final : public RtcEventLog { bool immediately_output_mode_ RTC_GUARDED_BY(mutex_) = false; bool need_schedule_output_ RTC_GUARDED_BY(mutex_) = false; - // Since we are posting tasks bound to `this`, it is critical that the event - // log and its members outlive `task_queue_`. Keep the `task_queue_` - // last to ensure it destructs first, or else tasks living on the queue might - // access other members after they've been torn down. - std::unique_ptr<rtc::TaskQueue> task_queue_; + std::unique_ptr<TaskQueueBase, TaskQueueDeleter> task_queue_; Mutex mutex_; }; |