From c7a3b08f074f5d29657a3fb9e3181cadda91cdf3 Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Thu, 28 Nov 2019 16:27:47 +0100 Subject: [PATCH] Prefix ENABLE_RTC_EVENT_LOG with WEBRTC_. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since this macro can be considered public, it makes sense to prefix it with WEBRTC_ (also to avoid potential conflicts with client code). This CL also removes some definitions of this macro in order to define it only where it is strictly needed (it is only used in a .cc file). Bug: webrtc:11142 Change-Id: Idce7389301e71d8434e238b3cf4ceaa9cf97cd87 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161008 Reviewed-by: Karl Wiberg Reviewed-by: Björn Terelius Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#29957} --- BUILD.gn | 1 - api/rtc_event_log/BUILD.gn | 2 +- api/rtc_event_log/rtc_event_log_factory.cc | 4 ++-- logging/BUILD.gn | 2 -- rtc_tools/BUILD.gn | 2 -- 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index f81ad5f509..337be46c4c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -476,7 +476,6 @@ if (!build_with_chromium) { } if (rtc_enable_protobuf) { - defines += [ "ENABLE_RTC_EVENT_LOG" ] deps += [ "logging:rtc_event_log_proto" ] } } diff --git a/api/rtc_event_log/BUILD.gn b/api/rtc_event_log/BUILD.gn index ef7ea2cb39..e853058e25 100644 --- a/api/rtc_event_log/BUILD.gn +++ b/api/rtc_event_log/BUILD.gn @@ -41,7 +41,7 @@ rtc_library("rtc_event_log_factory") { ] if (rtc_enable_protobuf) { - defines = [ "ENABLE_RTC_EVENT_LOG" ] + defines = [ "WEBRTC_ENABLE_RTC_EVENT_LOG" ] deps += [ "../../logging:rtc_event_log_impl" ] } } diff --git a/api/rtc_event_log/rtc_event_log_factory.cc b/api/rtc_event_log/rtc_event_log_factory.cc index f88997b849..2013584399 100644 --- a/api/rtc_event_log/rtc_event_log_factory.cc +++ b/api/rtc_event_log/rtc_event_log_factory.cc @@ -15,7 +15,7 @@ #include "rtc_base/checks.h" -#ifdef ENABLE_RTC_EVENT_LOG +#ifdef WEBRTC_ENABLE_RTC_EVENT_LOG #include "logging/rtc_event_log/rtc_event_log_impl.h" #endif @@ -28,7 +28,7 @@ RtcEventLogFactory::RtcEventLogFactory(TaskQueueFactory* task_queue_factory) std::unique_ptr RtcEventLogFactory::CreateRtcEventLog( RtcEventLog::EncodingType encoding_type) { -#ifdef ENABLE_RTC_EVENT_LOG +#ifdef WEBRTC_ENABLE_RTC_EVENT_LOG return std::make_unique(encoding_type, task_queue_factory_); #else return std::make_unique(); diff --git a/logging/BUILD.gn b/logging/BUILD.gn index 983b91362f..8046137461 100644 --- a/logging/BUILD.gn +++ b/logging/BUILD.gn @@ -197,7 +197,6 @@ rtc_library("rtc_event_log_impl_encoder") { ] if (rtc_enable_protobuf) { - defines += [ "ENABLE_RTC_EVENT_LOG" ] deps += [ ":ice_log", ":rtc_event_audio", @@ -340,7 +339,6 @@ if (rtc_enable_protobuf) { rtc_library("rtc_event_log_tests") { testonly = true assert(rtc_enable_protobuf) - defines = [ "ENABLE_RTC_EVENT_LOG" ] sources = [ "rtc_event_log/encoder/blob_encoding_unittest.cc", "rtc_event_log/encoder/delta_encoding_unittest.cc", diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn index fb9f8858b5..de5b909728 100644 --- a/rtc_tools/BUILD.gn +++ b/rtc_tools/BUILD.gn @@ -276,7 +276,6 @@ if (!build_with_chromium) { "rtc_event_log_visualizer/plot_python.h", "rtc_event_log_visualizer/triage_notifications.h", ] - defines = [ "ENABLE_RTC_EVENT_LOG" ] deps = [ ":chart_proto", "../api:function_view", @@ -321,7 +320,6 @@ if (rtc_include_tests) { "rtc_event_log_visualizer/main.cc", ] - defines = [ "ENABLE_RTC_EVENT_LOG" ] deps = [ ":event_log_visualizer_utils", "../api/neteq:neteq_api",