Skip to content

Commit

Permalink
Add feature flag for cras refactor
Browse files Browse the repository at this point in the history
CRAS is going to have a refactor, create a feature flag to avoid regression.

BUG=b:247732405
TEST=CQ

Change-Id: Iac9fe216eb20e0153a1f880c5bd1cd70ca3b3c70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4235259
Reviewed-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Commit-Queue: Ching Yun Chang <whalechang@google.com>
Auto-Submit: Ching Yun Chang <whalechang@google.com>
Cr-Commit-Position: refs/heads/main@{#1104232}
  • Loading branch information
whalechang authored and Chromium LUCI CQ committed Feb 11, 2023
1 parent 8fec8e7 commit d4b2ca9
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ash/constants/ash_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ BASE_FEATURE(kAudioPeripheralVolumeGranularity,
"AudioPeripheralVolumeGranularity",
base::FEATURE_ENABLED_BY_DEFAULT);

BASE_FEATURE(kCrasSplitAlsaUsbInternal,
"CrasSplitAlsaUsbInternal",
base::FEATURE_ENABLED_BY_DEFAULT);

// Controls whether the AudioSourceFetcher resamples the audio for speech
// recongnition.
BASE_FEATURE(kAudioSourceFetcherResampling,
Expand Down
2 changes: 2 additions & 0 deletions ash/constants/ash_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kAssistantNativeIcons);
COMPONENT_EXPORT(ASH_CONSTANTS)
BASE_DECLARE_FEATURE(kAudioPeripheralVolumeGranularity);
COMPONENT_EXPORT(ASH_CONSTANTS)
BASE_DECLARE_FEATURE(kCrasSplitAlsaUsbInternal);
COMPONENT_EXPORT(ASH_CONSTANTS)
BASE_DECLARE_FEATURE(kAudioSourceFetcherResampling);
COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kAudioUrl);
COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kAutoNightLight);
Expand Down
4 changes: 4 additions & 0 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5039,6 +5039,10 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kAudioPeripheralVolumeGranularityName,
flag_descriptions::kAudioPeripheralVolumeGranularityDescription, kOsCrOS,
FEATURE_VALUE_TYPE(ash::features::kAudioPeripheralVolumeGranularity)},
{"enable-cras-split-alsa-usb-internal",
flag_descriptions::kCrasSplitAlsaUsbInternalName,
flag_descriptions::kCrasSplitAlsaUsbInternalDescription, kOsDesktop,
FEATURE_VALUE_TYPE(ash::features::kCrasSplitAlsaUsbInternal)},
{"eche-swa", flag_descriptions::kEcheSWAName,
flag_descriptions::kEcheSWADescription, kOsCrOS,
FEATURE_VALUE_TYPE(ash::features::kEcheSWA)},
Expand Down
5 changes: 5 additions & 0 deletions chrome/browser/flag-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1948,6 +1948,11 @@
"owners": [ "jameshollyer@google.com" ],
"expiry_milestone": 100
},
{
"name": "enable-cras-split-alsa-usb-internal",
"owners": [ "whalechang@google.com", "chromeos-audio-sw@google.com" ],
"expiry_milestone": 125
},
{
"name": "enable-critical-persisted-tab-data",
"owners": [ "chrome-shopping@google.com" ],
Expand Down
6 changes: 6 additions & 0 deletions chrome/browser/flag_descriptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1716,6 +1716,12 @@ const char kTabAudioMutingDescription[] =
"When enabled, the audio indicators in the tab strip double as tab audio "
"mute controls.";

const char kCrasSplitAlsaUsbInternalName[] =
"CRAS Split USB/Internal refactor control";
const char kCrasSplitAlsaUsbInternalDescription[] =
"When enable, CRAS will create different iodev with USB and internal "
"device.";

const char kTabSelectionEditorV2Name[] = "Tab selection editor V2";
const char kTabSelectionEditorV2Description[] =
"Enable improved bulk tab editing capabilities.";
Expand Down
3 changes: 3 additions & 0 deletions chrome/browser/flag_descriptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,9 @@ extern const char kHeavyAdInterventionDescription[];
extern const char kTabAudioMutingName[];
extern const char kTabAudioMutingDescription[];

extern const char kCrasSplitAlsaUsbInternalName[];
extern const char kCrasSplitAlsaUsbInternalDescription[];

extern const char kTabSelectionEditorV2Name[];
extern const char kTabSelectionEditorV2Description[];

Expand Down
2 changes: 2 additions & 0 deletions tools/metrics/histograms/enums.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62348,6 +62348,7 @@ from previous Chrome versions.
<int value="420160748" label="CornerShortcuts:enabled"/>
<int value="420356964" label="OobeJelly:enabled"/>
<int value="420682005" label="AdaptiveButtonInTopToolbar:enabled"/>
<int value="421172666" label="CrasSplitAlsaUsbInternal:enabled"/>
<int value="421986951" label="UseRealColorSpaceForAndroidVideo:disabled"/>
<int value="422307097" label="PhysicalWeb:disabled"/>
<int value="422670720" label="ContextualSearchLongpressPanelHelp:disabled"/>
Expand Down Expand Up @@ -64331,6 +64332,7 @@ from previous Chrome versions.
<int value="1586251544" label="VoiceButtonInTopToolbar:disabled"/>
<int value="1586476635" label="LargeFaviconFromGoogle:enabled"/>
<int value="1587521886" label="SSLCommittedInterstitials:enabled"/>
<int value="1588184545" label="CrasSplitAlsaUsbInternal:disabled"/>
<int value="1588716465" label="CrostiniUseLxd4:disabled"/>
<int value="1589341623" label="disable-easy-unlock"/>
<int value="1590278995"
Expand Down

0 comments on commit d4b2ca9

Please sign in to comment.