Commit d5644ef2 authored by Chris Blume's avatar Chris Blume Committed by Commit Bot

Enable WCG on Pixel 4 by default

Wide color gamut on Pixel 4 was already enabled by default, but
the rigging was setup as though it wasn't. Part of the feature
roll-out is to mark the feature as enabled-by-default.

This CL mimics that step (but leaves it already enabled-by-default)
by removing the field trial and updating the feature check to
no longer require that field trial.

Bug: 1021181
Change-Id: I556a25b39f667e2e9199fb8d6d9b8f680d97fee0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1992010Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#729638}
parent 08116eca
......@@ -4,7 +4,7 @@
#include "chrome/common/chrome_features.h"
#include <vector>
#include <array>
#include "base/command_line.h"
#include "base/no_destructor.h"
......@@ -737,23 +737,12 @@ const base::Feature kHeavyAdPrivacyMitigations{
"HeavyAdPrivacyMitigations", base::FEATURE_ENABLED_BY_DEFAULT};
#if defined(OS_ANDROID)
const base::Feature kUseDisplayWideColorGamut{"UseDisplayWideColorGamut",
base::FEATURE_ENABLED_BY_DEFAULT};
bool UseDisplayWideColorGamut() {
auto compute_use_display_wide_color_gamut = []() {
// Enabled this feature for devices listed in "enabled_models" field trial
// param. This is a comma separated list.
std::string enabled_models_list = base::GetFieldTrialParamValueByFeature(
kUseDisplayWideColorGamut, "enabled_models");
if (enabled_models_list.empty())
return false;
const char* current_model =
base::android::BuildInfo::GetInstance()->model();
std::vector<std::string> enabled_models =
base::SplitString(enabled_models_list, ",", base::KEEP_WHITESPACE,
base::SPLIT_WANT_NONEMPTY);
const std::array<std::string, 2> enabled_models = {
std::string{"Pixel 4"}, std::string{"Pixel 4 XL"}};
for (const std::string& model : enabled_models) {
if (model == current_model)
return true;
......
......@@ -567,24 +567,6 @@
]
}
],
"AndroidWideColorGamut": [
{
"platforms": [
"android"
],
"experiments": [
{
"name": "UseDisplayWideColorGamut",
"params": {
"enabled_models": "Pixel 4,Pixel 4 XL"
},
"enable_features": [
"UseDisplayWideColorGamut"
]
}
]
}
],
"AppLauncherRefresh": [
{
"platforms": [
......
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