Skip to content

Commit

Permalink
Create feature flag for Chrome App Kiosk Lacros
Browse files Browse the repository at this point in the history
Bug: b/206912472
Change-Id: I0ef7258ba1543ef1d5fc15bbc0ac06b93e4fcf4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3568428
Reviewed-by: Anqing Zhao <anqing@chromium.org>
Commit-Queue: Ben Franz <bfranz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#988880}
  • Loading branch information
Ben Franz authored and Chromium LUCI CQ committed Apr 5, 2022
1 parent f9bba74 commit 441a84c
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 3 deletions.
4 changes: 4 additions & 0 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2987,6 +2987,10 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kWebRtcPipeWireCapturer)},
#endif // defined(WEBRTC_USE_PIPEWIRE)
#if BUILDFLAG(IS_CHROMEOS_ASH)
{"enable-lacros-in-chrome-kiosk",
flag_descriptions::kChromeKioskEnableLacrosName,
flag_descriptions::kChromeKioskEnableLacrosDescription, kOsCrOS,
FEATURE_VALUE_TYPE(features::kChromeKioskEnableLacros)},
{"enable-lacros-in-web-kiosk", flag_descriptions::kWebKioskEnableLacrosName,
flag_descriptions::kWebKioskEnableLacrosDescription, kOsCrOS,
FEATURE_VALUE_TYPE(features::kWebKioskEnableLacros)},
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 @@ -2269,6 +2269,11 @@
"owners": [ "rtinkoff" ],
"expiry_milestone": 105
},
{
"name": "enable-lacros-in-chrome-kiosk",
"owners": ["bfranz", "chromeos-kiosk-eng@google.com"],
"expiry_milestone": 120
},
{
"name": "enable-lacros-in-web-kiosk",
"owners": ["bfranz", "chromeos-kiosk-eng@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 @@ -5788,6 +5788,12 @@ const char kWebrtcPipeWireCapturerDescription[] =
#endif // #if defined(WEBRTC_USE_PIPEWIRE)

#if BUILDFLAG(IS_CHROMEOS_ASH)
const char kChromeKioskEnableLacrosName[] =
"Enables Lacros in the chrome app Kiosk";
const char kChromeKioskEnableLacrosDescription[] =
"Uses Lacros-chrome as the web browser in the chrome app Kiosk session on "
"Chrome OS. When disabled, the Ash-chrome will be used";

const char kWebKioskEnableLacrosName[] =
"Enables Lacros in the web (PWA) Kiosk";
const char kWebKioskEnableLacrosDescription[] =
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 @@ -3360,6 +3360,9 @@ extern const char kWebrtcPipeWireCapturerDescription[];
#endif // #if defined(WEBRTC_USE_PIPEWIRE)

#if BUILDFLAG(IS_CHROMEOS_ASH)
extern const char kChromeKioskEnableLacrosName[];
extern const char kChromeKioskEnableLacrosDescription[];

extern const char kWebKioskEnableLacrosName[];
extern const char kWebKioskEnableLacrosDescription[];
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Expand Down
12 changes: 9 additions & 3 deletions chrome/common/chrome_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ const base::Feature kDesktopPWAsDefaultOfflinePage{

// Moves the Extensions "puzzle piece" icon from the title bar into the app menu
// for web app windows.
const base::Feature kDesktopPWAsElidedExtensionsMenu{
const base::Feature kDesktopPWAsElidedExtensionsMenu {
"DesktopPWAsElidedExtensionsMenu",
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
base::FEATURE_ENABLED_BY_DEFAULT
Expand Down Expand Up @@ -873,8 +873,8 @@ const base::Feature kAbusiveNotificationPermissionRevocation{
"AbusiveOriginNotificationPermissionRevocation",
base::FEATURE_ENABLED_BY_DEFAULT};

const base::Feature kRemoveStatusBarInWebApps{
"RemoveStatusBarInWebApps",
const base::Feature kRemoveStatusBarInWebApps {
"RemoveStatusBarInWebApps",
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
base::FEATURE_ENABLED_BY_DEFAULT
#else
Expand Down Expand Up @@ -1137,6 +1137,12 @@ const base::Feature kWebAppManifestPolicyAppIdentityUpdate{
"WebAppManifestPolicyAppIdentityUpdate", base::FEATURE_ENABLED_BY_DEFAULT};

#if BUILDFLAG(IS_CHROMEOS_ASH)
// When this feature flag is enabled together with the LacrosAvailability
// policy, the Chrome app Kiosk session uses Lacros-chrome as the web browser to
// launch Chrome apps. When disabled, the Ash-chrome will be used instead.
const base::Feature kChromeKioskEnableLacros{"ChromeKioskEnableLacros",
base::FEATURE_DISABLED_BY_DEFAULT};

// When this feature flag is enabled together with the LacrosAvailability
// policy, the web (PWA) Kiosk session uses Lacros-chrome as the web browser to
// launch web (PWA) applications. When disabled, the Ash-chrome will be used
Expand Down
3 changes: 3 additions & 0 deletions chrome/common/chrome_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,9 @@ extern const base::Feature kWebAppManifestPolicyAppIdentityUpdate;
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kWebAppsCrosapi;

COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kChromeKioskEnableLacros;

COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kWebKioskEnableLacros;
#endif
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 @@ -53518,6 +53518,7 @@ from previous Chrome versions.
<int value="-1055845287" label="SensorContentSetting:enabled"/>
<int value="-1055523523" label="ForceMinorVersion100InUserAgent:disabled"/>
<int value="-1053496936" label="WebViewSendVariationsHeaders:disabled"/>
<int value="-1052831253" label="ChromeKioskEnableLacros:enabled"/>
<int value="-1052782474" label="enable-cloud-devices"/>
<int value="-1052415111" label="malware-interstitial-v2"/>
<int value="-1052219252" label="disable-captive-portal-bypass-proxy"/>
Expand Down Expand Up @@ -55382,6 +55383,7 @@ from previous Chrome versions.
<int value="255375615" label="stop-non-timers-in-background:enabled"/>
<int value="255765456"
label="ActivateMetricsReportingEnabledPolicyAndroid:disabled"/>
<int value="256753680" label="ChromeKioskEnableLacros:disabled"/>
<int value="258621334"
label="HappinessTrackingSurveysForDesktopDemo:disabled"/>
<int value="259021228" label="OffMainThreadFetch:disabled"/>
Expand Down

0 comments on commit 441a84c

Please sign in to comment.