[CrossDevice] Disable Cross-device features on Flex with switch.
This updates the logic for disabling the Cross-device feature suite on Flex. The build flag we previously used is not fully wired up, so we use the "reven branding" switch instead per the Flex team's recommendation. Test: Manually tested with "--reven-branding" switch to simulate Flex. Also regression tested all features with the suite allowed. Fixed: b:343212627 Change-Id: I51b843c52bc7a845fb73ea08b1966305df7ee5a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5593653 Reviewed-by: Xiyuan Xia <xiyuan@chromium.org> Commit-Queue: Michael Hansen <hansenmichael@google.com> Reviewed-by: Jon Mann <jonmann@chromium.org> Reviewed-by: Jack Shira <jackshira@google.com> Cr-Commit-Position: refs/heads/main@{#1311618}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
75c632784f
commit
36db64a74c
ash
chrome/browser
nearby_sharing
ui
webui
ash
settings
pages
chromeos/ash/services/multidevice_setup
@ -66,15 +66,10 @@ BASE_FEATURE(kAllowAmbientEQ,
|
||||
// Enables Cross-Device features, e.g. Nearby Share, Smart Lock, Fast Pair, etc.
|
||||
// This flag is used to disable Cross-Device on platforms where we cannot yet
|
||||
// guarantee a good experience with the stock Bluetooth hardware (e.g. Reven /
|
||||
// ChromeOS Flex).
|
||||
// ChromeOS Flex). Access through IsCrossDeviceFeatureSuiteAllowed().
|
||||
BASE_FEATURE(kAllowCrossDeviceFeatureSuite,
|
||||
"AllowCrossDeviceFeatureSuite",
|
||||
#if BUILDFLAG(IS_REVEN)
|
||||
base::FEATURE_DISABLED_BY_DEFAULT
|
||||
#else
|
||||
base::FEATURE_ENABLED_BY_DEFAULT
|
||||
#endif // BUILDFLAG(IS_REVEN)
|
||||
);
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
// Allows DevTools to open from the context menu and shortcut keys in Ash if
|
||||
// Lacros is the only browser.
|
||||
@ -3497,6 +3492,14 @@ bool IsCrosPrivacyHubLocationEnabled() {
|
||||
return base::FeatureList::IsEnabled(kCrosPrivacyHub);
|
||||
}
|
||||
|
||||
bool IsCrossDeviceFeatureSuiteAllowed() {
|
||||
if (switches::IsRevenBranding()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return base::FeatureList::IsEnabled(kAllowCrossDeviceFeatureSuite);
|
||||
}
|
||||
|
||||
bool IsDeskButtonEnabled() {
|
||||
return base::FeatureList::IsEnabled(kDeskButton);
|
||||
}
|
||||
@ -4239,16 +4242,13 @@ bool IsOobeLazyLoadingEnabled() {
|
||||
}
|
||||
|
||||
bool IsOobeQuickStartEnabled() {
|
||||
if (switches::IsRevenBranding()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// QuickStart directly depends on the 'Local Password' feature.
|
||||
if (!base::FeatureList::IsEnabled(kLocalPasswordForConsumers)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return base::FeatureList::IsEnabled(kOobeQuickStart);
|
||||
return IsCrossDeviceFeatureSuiteAllowed() &&
|
||||
base::FeatureList::IsEnabled(kOobeQuickStart);
|
||||
}
|
||||
|
||||
bool IsOobeQuickStartOnLoginScreenEnabled() {
|
||||
|
@ -1052,6 +1052,7 @@ COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCopyClientKeysCertsToChapsEnabled();
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCrosPrivacyHubAppPermissionsEnabled();
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCrosPrivacyHubAppPermissionsV2Enabled();
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCrosPrivacyHubLocationEnabled();
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCrossDeviceFeatureSuiteAllowed();
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS)
|
||||
bool IsCryptauthAttestationSyncingEnabled();
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsDeepLinkingEnabled();
|
||||
|
@ -12,7 +12,7 @@ namespace ash {
|
||||
namespace quick_pair {
|
||||
|
||||
bool HasHardwareSupport(scoped_refptr<device::BluetoothAdapter> adapter) {
|
||||
if (!base::FeatureList::IsEnabled(features::kAllowCrossDeviceFeatureSuite)) {
|
||||
if (!features::IsCrossDeviceFeatureSuiteAllowed()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1256,9 +1256,11 @@ void Shell::Init(
|
||||
std::make_unique<PolicyRecommendationRestorer>();
|
||||
screen_switch_check_controller_ =
|
||||
std::make_unique<ScreenSwitchCheckController>();
|
||||
multidevice_notification_presenter_ =
|
||||
std::make_unique<MultiDeviceNotificationPresenter>(
|
||||
message_center::MessageCenter::Get());
|
||||
if (features::IsCrossDeviceFeatureSuiteAllowed()) {
|
||||
multidevice_notification_presenter_ =
|
||||
std::make_unique<MultiDeviceNotificationPresenter>(
|
||||
message_center::MessageCenter::Get());
|
||||
}
|
||||
media_controller_ = std::make_unique<MediaControllerImpl>();
|
||||
media_notification_provider_ =
|
||||
shell_delegate_->CreateMediaNotificationProvider();
|
||||
|
@ -56,8 +56,7 @@ bool NearbySharingServiceFactory::IsNearbyShareSupportedForBrowserContext(
|
||||
return *IsSupportedTesting();
|
||||
}
|
||||
|
||||
if (!base::FeatureList::IsEnabled(
|
||||
ash::features::kAllowCrossDeviceFeatureSuite)) {
|
||||
if (!ash::features::IsCrossDeviceFeatureSuiteAllowed()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -468,8 +468,7 @@ void BluetoothSection::UpdateSearchTags() {
|
||||
updater.AddSearchTags(GetBluetoothSearchConcepts());
|
||||
|
||||
if (features::IsFastPairEnabled() &&
|
||||
base::FeatureList::IsEnabled(
|
||||
ash::features::kAllowCrossDeviceFeatureSuite)) {
|
||||
features::IsCrossDeviceFeatureSuiteAllowed()) {
|
||||
if (pref_service_->GetBoolean(ash::prefs::kFastPairEnabled)) {
|
||||
updater.AddSearchTags(GetFastPairOnSearchConcepts());
|
||||
} else {
|
||||
|
@ -751,8 +751,7 @@ void MultiDeviceSection::AddLoadTimeData(
|
||||
GetHelpUrlWithBoard(phonehub::kPhoneHubLearnMoreLink)));
|
||||
|
||||
html_source->AddBoolean("isCrossDeviceFeatureSuiteEnabled",
|
||||
base::FeatureList::IsEnabled(
|
||||
ash::features::kAllowCrossDeviceFeatureSuite));
|
||||
features::IsCrossDeviceFeatureSuiteAllowed());
|
||||
|
||||
// We still need to register strings even if Nearby Share is not supported.
|
||||
// For example, the HTML is always built but only displayed if Nearby Share is
|
||||
@ -891,8 +890,7 @@ void MultiDeviceSection::OnHostStatusChanged(
|
||||
updater.RemoveSearchTags(GetMultiDeviceOptedOutSearchConcepts());
|
||||
updater.RemoveSearchTags(GetMultiDeviceOptedInSearchConcepts());
|
||||
|
||||
if (!base::FeatureList::IsEnabled(
|
||||
ash::features::kAllowCrossDeviceFeatureSuite)) {
|
||||
if (!features::IsCrossDeviceFeatureSuiteAllowed()) {
|
||||
// Do not add multidevice search tags if Cross Device is disabled.
|
||||
return;
|
||||
}
|
||||
@ -914,8 +912,7 @@ void MultiDeviceSection::OnFeatureStatesChanged(
|
||||
updater.RemoveSearchTags(GetMultiDeviceOptedInWifiSyncSearchConcepts());
|
||||
updater.RemoveSearchTags(GetMultiDeviceOptedInPhoneHubAppsSearchConcepts());
|
||||
|
||||
if (!base::FeatureList::IsEnabled(
|
||||
ash::features::kAllowCrossDeviceFeatureSuite)) {
|
||||
if (!features::IsCrossDeviceFeatureSuiteAllowed()) {
|
||||
// Do not add multidevice search tags if Cross Device is disabled.
|
||||
return;
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ bool FeatureStateManagerImpl::IsAllowedByPolicy(mojom::Feature feature) {
|
||||
}
|
||||
|
||||
bool FeatureStateManagerImpl::IsSupportedByChromebook(mojom::Feature feature) {
|
||||
if (!base::FeatureList::IsEnabled(features::kAllowCrossDeviceFeatureSuite)) {
|
||||
if (!features::IsCrossDeviceFeatureSuiteAllowed()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user