diff --git a/system_wrappers/BUILD.gn b/system_wrappers/BUILD.gn index 3522193c99..f32cafe6d0 100644 --- a/system_wrappers/BUILD.gn +++ b/system_wrappers/BUILD.gn @@ -96,7 +96,6 @@ rtc_library("field_trial") { deps = [ "../rtc_base:checks", "../rtc_base:logging", - "../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/strings", ] } @@ -129,7 +128,6 @@ rtc_library("metrics") { deps = [ "../rtc_base:checks", "../rtc_base:rtc_base_approved", - "../rtc_base/system:rtc_export", ] } diff --git a/system_wrappers/include/field_trial.h b/system_wrappers/include/field_trial.h index 1b5be7b110..1d0cef447d 100644 --- a/system_wrappers/include/field_trial.h +++ b/system_wrappers/include/field_trial.h @@ -13,8 +13,6 @@ #include -#include "rtc_base/system/rtc_export.h" - // Field trials allow webrtc clients (such as Chrome) to turn on feature code // in binaries out in the field and gather information with that. // @@ -63,7 +61,7 @@ namespace field_trial { // if the trial does not exists. // // Note: To keep things tidy append all the trial names with WebRTC. -RTC_EXPORT std::string FindFullName(const std::string& name); +std::string FindFullName(const std::string& name); // Convenience method, returns true iff FindFullName(name) return a string that // starts with "Enabled". @@ -82,7 +80,7 @@ inline bool IsDisabled(const char* name) { // This method can be called at most once before any other call into webrtc. // E.g. before the peer connection factory is constructed. // Note: trials_string must never be destroyed. -RTC_EXPORT void InitFieldTrialsFromString(const char* trials_string); +void InitFieldTrialsFromString(const char* trials_string); const char* GetFieldTrialString(); diff --git a/system_wrappers/include/metrics.h b/system_wrappers/include/metrics.h index a9debea84d..18c97574b1 100644 --- a/system_wrappers/include/metrics.h +++ b/system_wrappers/include/metrics.h @@ -19,7 +19,6 @@ #include "rtc_base/atomic_ops.h" #include "rtc_base/checks.h" -#include "rtc_base/system/rtc_export.h" // Macros for allowing WebRTC clients (e.g. Chrome) to gather and aggregate // statistics. @@ -254,30 +253,29 @@ class Histogram; // histogram). // Get histogram for counters. -RTC_EXPORT Histogram* HistogramFactoryGetCounts(const std::string& name, - int min, - int max, - int bucket_count); +Histogram* HistogramFactoryGetCounts(const std::string& name, + int min, + int max, + int bucket_count); // Get histogram for counters with linear bucket spacing. -RTC_EXPORT Histogram* HistogramFactoryGetCountsLinear(const std::string& name, - int min, - int max, - int bucket_count); +Histogram* HistogramFactoryGetCountsLinear(const std::string& name, + int min, + int max, + int bucket_count); // Get histogram for enumerators. // |boundary| should be above the max enumerator sample. -RTC_EXPORT Histogram* HistogramFactoryGetEnumeration(const std::string& name, - int boundary); +Histogram* HistogramFactoryGetEnumeration(const std::string& name, + int boundary); // Get sparse histogram for enumerators. // |boundary| should be above the max enumerator sample. -RTC_EXPORT Histogram* SparseHistogramFactoryGetEnumeration( - const std::string& name, - int boundary); +Histogram* SparseHistogramFactoryGetEnumeration(const std::string& name, + int boundary); // Function for adding a |sample| to a histogram. -RTC_EXPORT void HistogramAdd(Histogram* histogram_pointer, int sample); +void HistogramAdd(Histogram* histogram_pointer, int sample); struct SampleInfo { SampleInfo(const std::string& name, int min, int max, size_t bucket_count); diff --git a/test/fuzzers/BUILD.gn b/test/fuzzers/BUILD.gn index deb4fcc050..a063d6a62c 100644 --- a/test/fuzzers/BUILD.gn +++ b/test/fuzzers/BUILD.gn @@ -15,12 +15,17 @@ rtc_library("webrtc_fuzzer_main") { "webrtc_fuzzer_main.cc", ] deps = [ + "../../rtc_base:rtc_base_approved", "//testing/libfuzzer:libfuzzer_main", ] + + # When WebRTC fuzzer tests are built on Chromium bots they need to link + # with Chromium's implementation of metrics and field trial. if (build_with_chromium) { - deps += [ "//third_party/webrtc_overrides:webrtc_component" ] - } else { - deps += [ "../../rtc_base:rtc_base_approved" ] + deps += [ + "../../../webrtc_overrides:field_trial", + "../../../webrtc_overrides:metrics", + ] } }