webrtc_m130/logging/rtc_event_log/fake_rtc_event_log.cc
Qingsi Wang 7685e86fa6 Pass the RtcEventLog instance to ICE via JsepTransportController.
This CL fixes a bug that the RtcEventLog owned by PeerConnection was not
passed to P2PTransportChannel after JsepTransportController was
introduced to deprecate the legacy TransportController.

Bug: webrtc:9337
Change-Id: I406cd9c0761dfe67f969aa99c6141e1ab38249d5
Reviewed-on: https://webrtc-review.googlesource.com/79964
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23572}
2018-06-12 05:04:35 +00:00

42 lines
1.3 KiB
C++

/*
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "logging/rtc_event_log/fake_rtc_event_log.h"
#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h"
#include "rtc_base/bind.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
namespace webrtc {
FakeRtcEventLog::FakeRtcEventLog(rtc::Thread* thread) : thread_(thread) {
RTC_DCHECK(thread_);
}
FakeRtcEventLog::~FakeRtcEventLog() = default;
bool FakeRtcEventLog::StartLogging(std::unique_ptr<RtcEventLogOutput> output,
int64_t output_period_ms) {
return true;
}
void FakeRtcEventLog::StopLogging() {
invoker_.Flush(thread_);
}
void FakeRtcEventLog::Log(std::unique_ptr<RtcEvent> event) {
RtcEvent::Type rtc_event_type = event->GetType();
invoker_.AsyncInvoke<void>(
RTC_FROM_HERE, thread_,
rtc::Bind(&FakeRtcEventLog::IncrementEventCount, this, rtc_event_type));
}
} // namespace webrtc