Commit 91fa166b authored by Mirko Bonadei's avatar Mirko Bonadei Committed by Commit Bot

Remove runtime_enabled_features from WebRTC.

While working on removing field_trial_default and metrics_default
(in order to avoid link time replacement and use better defaults), we
discovered that runtime_enabled_features (which also has a _default
implementation) is not used (more info on this here:
https://bugs.chromium.org/p/webrtc/issues/detail?id=9631#c21).

Usage of this code has been removed in WebRTC with this CL:
https://webrtc-review.googlesource.com/c/src/+/102361.

Bug: webrtc:9631
Change-Id: Ief33059cd329f429b9bbdd7520808e62e3f6f62b
Reviewed-on: https://chromium-review.googlesource.com/1249029Reviewed-by: default avatarHenrik Grunell <grunell@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595040}
parent 65f0159b
......@@ -39,7 +39,7 @@ group("jingle_deps") {
]
}
static_library("webrtc") {
source_set("webrtc") {
public_deps = [
":jingle_deps",
......@@ -57,29 +57,22 @@ static_library("webrtc") {
cflags = [ "/wd4005" ]
}
# 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.
# When Chromium is built for NACL or Chromecast, WebRTC provides a
# field_trial implementation so there is no need to depend on
# ":field_trial".
# This configuration happens here:
# https://cs.chromium.org/chromium/src/third_party/webrtc/webrtc.gni?l=44-51&rcl=95c56eebe0a2b31ad5752138d15b431124e17d36
if (is_nacl) {
deps += [
"//native_client_sdk/src/libraries/nacl_io",
"//third_party/webrtc/system_wrappers:runtime_enabled_features_default",
]
} else if (is_chromecast) {
deps += [
"//third_party/webrtc/system_wrappers:runtime_enabled_features_default",
]
} else {
# Otherwise, we just add the field_trial which redirects to base and
# runtime_enabled_features which redirects to content/public/common.
sources = [
"runtime_enabled_features.cc",
]
} else if (!is_chromecast) {
# When Chromium doesn't build for NaCL or Chromecast, WebRTC doesn't
# provide an implementation for field_trial and a custom one (that uses
# base/metrics/field_trial.h is provided).
deps += [
":field_trial",
"//base",
"//third_party/webrtc/system_wrappers:runtime_enabled_features_api",
]
}
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Define webrtc::runtime_features::IsFeatureEnabled to provide webrtc with a
// chromium runtime flags access.
#include "base/feature_list.h"
#include "third_party/webrtc/system_wrappers/include/runtime_enabled_features.h"
namespace webrtc {
namespace runtime_enabled_features {
const base::Feature kWebRtcDualStreamMode{"WebRTC-DualStreamMode",
base::FEATURE_DISABLED_BY_DEFAULT};
bool IsFeatureEnabled(std::string feature_name) {
if (feature_name == kDualStreamModeFeatureName)
return base::FeatureList::IsEnabled(kWebRtcDualStreamMode);
return false;
}
} // namespace runtime_enabled_features
} // namespace webrtc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment