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 |