diff --git a/pc/BUILD.gn b/pc/BUILD.gn index 1300f9453f..1e1e4bad88 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -38,12 +38,9 @@ group("pc") { deps = [ ":rtc_pc" ] } -rtc_library("proxy") { +rtc_source_set("proxy") { visibility = [ ":*" ] - sources = [ - "proxy.cc", - "proxy.h", - ] + sources = [ "proxy.h" ] deps = [ "../api:scoped_refptr", "../api/task_queue", diff --git a/pc/proxy.cc b/pc/proxy.cc deleted file mode 100644 index 5f4e0b8832..0000000000 --- a/pc/proxy.cc +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2017 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 "pc/proxy.h" - -#include "rtc_base/trace_event.h" - -namespace webrtc { -namespace proxy_internal { -ScopedTrace::ScopedTrace(const char* class_and_method_name) - : class_and_method_name_(class_and_method_name) { - TRACE_EVENT_BEGIN0("webrtc", class_and_method_name_); -} -ScopedTrace::~ScopedTrace() { - TRACE_EVENT_END0("webrtc", class_and_method_name_); -} -} // namespace proxy_internal -} // namespace webrtc diff --git a/pc/proxy.h b/pc/proxy.h index f39b4a59e2..eecd601048 100644 --- a/pc/proxy.h +++ b/pc/proxy.h @@ -70,24 +70,13 @@ #include "rtc_base/string_utils.h" #include "rtc_base/system/rtc_export.h" #include "rtc_base/thread.h" +#include "rtc_base/trace_event.h" #if !defined(RTC_DISABLE_PROXY_TRACE_EVENTS) && !defined(WEBRTC_CHROMIUM_BUILD) #define RTC_DISABLE_PROXY_TRACE_EVENTS #endif namespace webrtc { -namespace proxy_internal { - -// Class for tracing the lifetime of MethodCall::Marshal. -class ScopedTrace { - public: - explicit ScopedTrace(const char* class_and_method_name); - ~ScopedTrace(); - - private: - [[maybe_unused]] const char* const class_and_method_name_; -}; -} // namespace proxy_internal template class ReturnType { @@ -334,7 +323,7 @@ class ConstMethodCall { rtc::MakeCompileTimeString(proxy_name_) \ .Concat(rtc::MakeCompileTimeString("::")) \ .Concat(rtc::MakeCompileTimeString(#method)); \ - proxy_internal::ScopedTrace scoped_trace(class_and_method_name.string) + TRACE_EVENT0("webrtc", class_and_method_name.string) #endif // if defined(RTC_DISABLE_PROXY_TRACE_EVENTS)