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}
This commit is contained in:

committed by
Commit Bot

parent
e85faf9ab9
commit
8994c8bab3
@ -96,6 +96,7 @@ rtc_library("field_trial") {
|
||||
deps = [
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:logging",
|
||||
"../rtc_base/system:rtc_export",
|
||||
"//third_party/abseil-cpp/absl/strings",
|
||||
]
|
||||
}
|
||||
@ -128,6 +129,7 @@ rtc_library("metrics") {
|
||||
deps = [
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../rtc_base/system:rtc_export",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
#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.
|
||||
//
|
||||
@ -61,7 +63,7 @@ namespace field_trial {
|
||||
// if the trial does not exists.
|
||||
//
|
||||
// Note: To keep things tidy append all the trial names with WebRTC.
|
||||
std::string FindFullName(const std::string& name);
|
||||
RTC_EXPORT std::string FindFullName(const std::string& name);
|
||||
|
||||
// Convenience method, returns true iff FindFullName(name) return a string that
|
||||
// starts with "Enabled".
|
||||
@ -80,7 +82,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.
|
||||
void InitFieldTrialsFromString(const char* trials_string);
|
||||
RTC_EXPORT void InitFieldTrialsFromString(const char* trials_string);
|
||||
|
||||
const char* GetFieldTrialString();
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#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.
|
||||
@ -253,29 +254,30 @@ class Histogram;
|
||||
// histogram).
|
||||
|
||||
// Get histogram for counters.
|
||||
Histogram* HistogramFactoryGetCounts(const std::string& name,
|
||||
int min,
|
||||
int max,
|
||||
int bucket_count);
|
||||
RTC_EXPORT Histogram* HistogramFactoryGetCounts(const std::string& name,
|
||||
int min,
|
||||
int max,
|
||||
int bucket_count);
|
||||
|
||||
// Get histogram for counters with linear bucket spacing.
|
||||
Histogram* HistogramFactoryGetCountsLinear(const std::string& name,
|
||||
int min,
|
||||
int max,
|
||||
int bucket_count);
|
||||
RTC_EXPORT 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.
|
||||
Histogram* HistogramFactoryGetEnumeration(const std::string& name,
|
||||
int boundary);
|
||||
RTC_EXPORT Histogram* HistogramFactoryGetEnumeration(const std::string& name,
|
||||
int boundary);
|
||||
|
||||
// Get sparse histogram for enumerators.
|
||||
// |boundary| should be above the max enumerator sample.
|
||||
Histogram* SparseHistogramFactoryGetEnumeration(const std::string& name,
|
||||
int boundary);
|
||||
RTC_EXPORT Histogram* SparseHistogramFactoryGetEnumeration(
|
||||
const std::string& name,
|
||||
int boundary);
|
||||
|
||||
// Function for adding a |sample| to a histogram.
|
||||
void HistogramAdd(Histogram* histogram_pointer, int sample);
|
||||
RTC_EXPORT void HistogramAdd(Histogram* histogram_pointer, int sample);
|
||||
|
||||
struct SampleInfo {
|
||||
SampleInfo(const std::string& name, int min, int max, size_t bucket_count);
|
||||
|
@ -15,17 +15,12 @@ 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 += [
|
||||
"../../../webrtc_overrides:field_trial",
|
||||
"../../../webrtc_overrides:metrics",
|
||||
]
|
||||
deps += [ "//third_party/webrtc_overrides:webrtc_component" ]
|
||||
} else {
|
||||
deps += [ "../../rtc_base:rtc_base_approved" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user