Commit d94052ab authored by Alex Newcomer's avatar Alex Newcomer Committed by Commit Bot

cros: Enable hide shelf controls by default

This feature has been enabled on many boards for a while. This
CL enables it on all boards.

Bug: 1123549
Change-Id: I6bccd9f1d9c75358b3aadebc468b0670669db2cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2386008
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Auto-Submit: Alex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803231}
parent 314fd620
...@@ -4,34 +4,15 @@ ...@@ -4,34 +4,15 @@
#include "ash/public/cpp/ash_features.h" #include "ash/public/cpp/ash_features.h"
#include <vector>
#include "ash/public/cpp/ash_switches.h" #include "ash/public/cpp/ash_switches.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/feature_list.h" #include "base/feature_list.h"
#include "base/strings/string_split.h"
#include "base/system/sys_info.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chromeos/constants/chromeos_switches.h" #include "chromeos/constants/chromeos_switches.h"
namespace ash { namespace ash {
namespace features { namespace features {
namespace {
bool HideShelfControlButtonsEnabledForCurrentBoard() {
std::vector<std::string> board =
base::SplitString(base::SysInfo::GetLsbReleaseBoard(), "-",
base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
if (board.empty())
return false;
return board[0] == "kukui" || board[0] == "hatch" || board[0] == "eve" ||
board[0] == "meowth" || board[0] == "hana" || board[0] == "cyan" ||
board[0] == "scarlet";
}
} // namespace
const base::Feature kAllowAmbientEQ{"AllowAmbientEQ", const base::Feature kAllowAmbientEQ{"AllowAmbientEQ",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
...@@ -135,11 +116,7 @@ const base::Feature kEnableBackgroundBlur{"EnableBackgroundBlur", ...@@ -135,11 +116,7 @@ const base::Feature kEnableBackgroundBlur{"EnableBackgroundBlur",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kHideShelfControlsInTabletMode{ const base::Feature kHideShelfControlsInTabletMode{
"HideShelfControlsInTabletMode", base::FEATURE_DISABLED_BY_DEFAULT}; "HideShelfControlsInTabletMode", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kHideShelfControlsInTabletModeForAllowedBoards{
"HideShelfControlsInTabletModeForAllowedBoard",
base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kSystemTrayMicGainSetting{"SystemTrayMicGainSetting", const base::Feature kSystemTrayMicGainSetting{"SystemTrayMicGainSetting",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
...@@ -275,15 +252,6 @@ bool IsHideShelfControlsInTabletModeEnabled() { ...@@ -275,15 +252,6 @@ bool IsHideShelfControlsInTabletModeEnabled() {
if (!IsDragFromShelfToHomeOrOverviewEnabled()) if (!IsDragFromShelfToHomeOrOverviewEnabled())
return false; return false;
// Use enabled by default feature it the current board is in the
// default-by-default allowlist.
static const bool enabled_for_board =
HideShelfControlButtonsEnabledForCurrentBoard();
if (enabled_for_board) {
return base::FeatureList::IsEnabled(
kHideShelfControlsInTabletModeForAllowedBoards);
}
return base::FeatureList::IsEnabled(kHideShelfControlsInTabletMode); return base::FeatureList::IsEnabled(kHideShelfControlsInTabletMode);
} }
......
...@@ -153,11 +153,6 @@ ASH_PUBLIC_EXPORT extern const base::Feature kEnableBackgroundBlur; ...@@ -153,11 +153,6 @@ ASH_PUBLIC_EXPORT extern const base::Feature kEnableBackgroundBlur;
// preferences, or policy). // preferences, or policy).
ASH_PUBLIC_EXPORT extern const base::Feature kHideShelfControlsInTabletMode; ASH_PUBLIC_EXPORT extern const base::Feature kHideShelfControlsInTabletMode;
// Same as kHideShelfCOntrolsInTabletMode, but enabled by default. Used if the
// current board is allowlisted for the feature.
ASH_PUBLIC_EXPORT extern const base::Feature
kHideShelfControlsInTabletModeForAllowedBoards;
// Enables sliders for setting mic gain levels in the more audio settings // Enables sliders for setting mic gain levels in the more audio settings
// section in the system tray. // section in the system tray.
ASH_PUBLIC_EXPORT extern const base::Feature kSystemTrayMicGainSetting; ASH_PUBLIC_EXPORT extern const base::Feature kSystemTrayMicGainSetting;
......
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