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

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: Another rebase and accompanying changes. Created 4 years, 6 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
« no previous file with comments | « webrtc/call/rtc_event_log.h ('k') | webrtc/media/base/mediaengine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/rtc_event_log.cc
diff --git a/webrtc/call/rtc_event_log.cc b/webrtc/call/rtc_event_log.cc
index 7ea1e167a1e0a15e905c1e47bb722de84b97018f..840b210d15378dbbdf1ee079886674fe6064d27b 100644
--- a/webrtc/call/rtc_event_log.cc
+++ b/webrtc/call/rtc_event_log.cc
@@ -38,9 +38,7 @@
namespace webrtc {
-#ifndef ENABLE_RTC_EVENT_LOG
-
-// No-op implementation if flag is not set.
+// No-op implementation is used if flag is not set, or in tests.
class RtcEventLogNullImpl final : public RtcEventLog {
public:
bool StartLogging(const std::string& file_name,
@@ -74,7 +72,7 @@ class RtcEventLogNullImpl final : public RtcEventLog {
int32_t total_packets) override {}
};
-#else // ENABLE_RTC_EVENT_LOG is defined
+#ifdef ENABLE_RTC_EVENT_LOG
class RtcEventLogImpl final : public RtcEventLog {
public:
@@ -465,4 +463,8 @@ std::unique_ptr<RtcEventLog> RtcEventLog::Create(const Clock* clock) {
#endif // ENABLE_RTC_EVENT_LOG
}
+std::unique_ptr<RtcEventLog> RtcEventLog::CreateNull() {
+ return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl());
+}
+
} // namespace webrtc
« no previous file with comments | « webrtc/call/rtc_event_log.h ('k') | webrtc/media/base/mediaengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698