diff --git a/system_wrappers/BUILD.gn b/system_wrappers/BUILD.gn index 0f5dc140db..b3e09f8b57 100644 --- a/system_wrappers/BUILD.gn +++ b/system_wrappers/BUILD.gn @@ -105,6 +105,16 @@ rtc_source_set("field_trial") { if (rtc_exclude_field_trial_default) { defines = [ "WEBRTC_EXCLUDE_FIELD_TRIAL_DEFAULT" ] } + if (build_with_chromium) { + # When WebRTC is built as part of Chromium it should exclude the default + # implementation of field_trial unless it is building for NACL or + # Chromecast. + if (!is_nacl && !is_chromecast) { + deps = [ + "../../webrtc_overrides:field_trial", + ] + } + } } rtc_source_set("metrics") { @@ -123,6 +133,9 @@ rtc_source_set("metrics") { "../rtc_base:checks", "../rtc_base:rtc_base_approved", ] + if (build_with_chromium) { + deps += [ "../../webrtc_overrides:metrics" ] + } } if (is_android && !build_with_mozilla) {