| Index: base/feature_list.cc
|
| diff --git a/base/feature_list.cc b/base/feature_list.cc
|
| index da5efe0aaf78eb0d984d104e72e3686718b2c1da..46732108dd6fcf0004e14b7ad6da06faf3561718 100644
|
| --- a/base/feature_list.cc
|
| +++ b/base/feature_list.cc
|
| @@ -137,6 +137,11 @@ bool FeatureList::IsEnabled(const Feature& feature) {
|
| }
|
|
|
| // static
|
| +FieldTrial* FeatureList::GetFieldTrial(const Feature& feature) {
|
| + return GetInstance()->GetAssociatedFieldTrial(feature);
|
| +}
|
| +
|
| +// static
|
| std::vector<std::string> FeatureList::SplitFeatureListString(
|
| const std::string& input) {
|
| return SplitString(input, ",", TRIM_WHITESPACE, SPLIT_WANT_NONEMPTY);
|
| @@ -217,6 +222,20 @@ bool FeatureList::IsFeatureEnabled(const Feature& feature) {
|
| return feature.default_state == FEATURE_ENABLED_BY_DEFAULT;
|
| }
|
|
|
| +FieldTrial* FeatureList::GetAssociatedFieldTrial(const Feature& feature) {
|
| + DCHECK(initialized_);
|
| + DCHECK(IsValidFeatureOrFieldTrialName(feature.name)) << feature.name;
|
| + DCHECK(CheckFeatureIdentity(feature)) << feature.name;
|
| +
|
| + auto it = overrides_.find(feature.name);
|
| + if (it != overrides_.end()) {
|
| + const OverrideEntry& entry = it->second;
|
| + return entry.field_trial;
|
| + }
|
| +
|
| + return nullptr;
|
| +}
|
| +
|
| void FeatureList::RegisterOverridesFromCommandLine(
|
| const std::string& feature_list,
|
| OverrideState overridden_state) {
|
|
|