• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright 2018 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #ifndef LOGGING_RTC_EVENT_LOG_FAKE_RTC_EVENT_LOG_FACTORY_H_
12 #define LOGGING_RTC_EVENT_LOG_FAKE_RTC_EVENT_LOG_FACTORY_H_
13 
14 #include <memory>
15 
16 #include "api/rtc_event_log/rtc_event_log_factory_interface.h"
17 #include "logging/rtc_event_log/fake_rtc_event_log.h"
18 #include "rtc_base/thread.h"
19 
20 namespace webrtc {
21 
22 class FakeRtcEventLogFactory : public RtcEventLogFactoryInterface {
23  public:
FakeRtcEventLogFactory(rtc::Thread * thread)24   explicit FakeRtcEventLogFactory(rtc::Thread* thread) : thread_(thread) {}
~FakeRtcEventLogFactory()25   ~FakeRtcEventLogFactory() override {}
26 
27   std::unique_ptr<RtcEventLog> CreateRtcEventLog(
28       RtcEventLog::EncodingType encoding_type) override;
29 
last_log_created()30   webrtc::RtcEventLog* last_log_created() { return last_log_created_; }
thread()31   rtc::Thread* thread() { return thread_; }
32 
33  private:
34   webrtc::RtcEventLog* last_log_created_;
35   rtc::Thread* thread_;
36 };
37 
38 }  // namespace webrtc
39 
40 #endif  // LOGGING_RTC_EVENT_LOG_FAKE_RTC_EVENT_LOG_FACTORY_H_
41