Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(506)

Unified Diff: webrtc/call/rtc_event_log.cc

Issue 1748403002: Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Undid unneccessary changes to rtp_rtcp module. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/call/rtc_event_log.cc
diff --git a/webrtc/call/rtc_event_log.cc b/webrtc/call/rtc_event_log.cc
index 361db81c068ccc99b480918ad55c05cbd1be1656..bdbde9630115f7cfebae92f7b30a6f2ee785a32d 100644
--- a/webrtc/call/rtc_event_log.cc
+++ b/webrtc/call/rtc_event_log.cc
@@ -16,6 +16,7 @@
#include "webrtc/base/checks.h"
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/thread_annotations.h"
+#include "webrtc/base/thread_checker.h"
#include "webrtc/call.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "webrtc/modules/rtp_rtcp/source/byte_io.h"
@@ -66,6 +67,7 @@ class RtcEventLogImpl final : public RtcEventLog {
class RtcEventLogImpl final : public RtcEventLog {
public:
RtcEventLogImpl();
+ ~RtcEventLogImpl();
the sun 2016/03/21 13:03:08 override
ivoc 2016/03/22 13:44:54 Done.
void SetBufferDuration(int64_t buffer_duration_us) override;
void StartLogging(const std::string& file_name, int duration_ms) override;
@@ -104,6 +106,7 @@ class RtcEventLogImpl final : public RtcEventLog {
void AddRecentEvent(const rtclog::Event& event)
EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ rtc::ThreadChecker thread_checker_;
rtc::CriticalSection crit_;
rtc::scoped_ptr<FileWrapper> file_ GUARDED_BY(crit_) =
rtc::scoped_ptr<FileWrapper>(FileWrapper::Create());
@@ -180,6 +183,11 @@ RtcEventLogImpl::RtcEventLogImpl()
start_time_us_(0),
duration_us_(0),
clock_(Clock::GetRealTimeClock()) {
+ RTC_DCHECK(thread_checker_.CalledOnValidThread());
+}
+
+RtcEventLogImpl::~RtcEventLogImpl() {
+ RTC_DCHECK(thread_checker_.CalledOnValidThread());
}
void RtcEventLogImpl::SetBufferDuration(int64_t buffer_duration_us) {

Powered by Google App Engine
This is Rietveld 408576698