Revert "Reland "Make webrtc_fuzzer_main depend on webrtc_component in Chromium.""

This reverts commit 8994c8bab315fa34b75a8e79b78bb99c86f69966.

Reason for revert: While RTC_EXPORTS are needed, this is still not
enough, I will try another approach, similar to what we do for
rtc_base/logging.{cc,h}.

Original change's description:
> Reland "Make webrtc_fuzzer_main depend on webrtc_component in Chromium."
> 
> This is a reland of 2148e9a931ea1a8a2ac0bfffd56e12370f8bf18c
> 
> Original change's description:
> > Make webrtc_fuzzer_main depend on webrtc_component in Chromium.
> >
> > This is needed in order to land [1] and restrict visibility of some
> > //third_party/webrtc_overrides targets.
> >
> > [1] - https://chromium-review.googlesource.com/c/chromium/src/+/1930801
> >
> > Bug: chromium:896154
> > Change-Id: Ie71c44ee9a0203a85d77a1199acdcb8581dfb71b
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160308
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#29875}
> 
> No-Try: True
> No-Tree-Checks: true
> TBR: kwiberg@webrtc.org
> Bug: chromium:896154
> Change-Id: I157bd4f90528a38ac16f17dd17af2f255dbd5ec9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160401
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29888}

TBR=mbonadei@webrtc.org,kwiberg@webrtc.org

Change-Id: If969618e3f0a0cd70204128f1e8a2b06cf407b6e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:896154
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160402
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29889}
This commit is contained in:
Mirko Bonadei
2019-11-23 15:10:32 +00:00
committed by Commit Bot
parent 8994c8bab3
commit 51868f52c6
4 changed files with 23 additions and 24 deletions

View File

@ -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",
]
}

View File

@ -13,8 +13,6 @@
#include <string>
#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();

View File

@ -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);

View File

@ -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",
]
}
}