Skip to content

Commit

Permalink
[FedCM] Enable FedCM desktop settings by default
Browse files Browse the repository at this point in the history
This CL changes how FedCM desktop settings are enabled. Previously,
FedCM desktop settings were enabled when both
(1) FedCM feature is enabled
AND
(2) 'DesktopSettings' field trial is enabled.

This CL changes the requirement to just (1).

BUG=1324742

Change-Id: I2c736dc82ece9fee6ef4683a8fc6161f140806d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3641680
Reviewed-by: Yi Gu <yigu@chromium.org>
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1002446}
  • Loading branch information
pkotwicz authored and Chromium LUCI CQ committed May 12, 2022
1 parent 0acf54f commit ed8d0c7
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 27 deletions.
8 changes: 0 additions & 8 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2459,19 +2459,11 @@ const FeatureEntry::FeatureParam kFedCmVariationAutoSignin[] = {
{features::kFedCmAutoSigninFieldTrialParamName, "true"}};
const FeatureEntry::FeatureParam kFedCmVariationIdpSignout[] = {
{features::kFedCmIdpSignoutFieldTrialParamName, "true"}};
#if !BUILDFLAG(IS_ANDROID)
const FeatureEntry::FeatureParam kFedCmVariationDesktopSettings[] = {
{features::kFedCmDesktopSettingsFieldTrialParamName, "true"}};
#endif // BUILDFLAG(IS_ANDROID)
const FeatureEntry::FeatureVariation kFedCmFeatureVariations[] = {
{"- with FedCM auto sign-in", kFedCmVariationAutoSignin,
std::size(kFedCmVariationAutoSignin), nullptr},
{"- with FedCM IDP sign-out", kFedCmVariationIdpSignout,
std::size(kFedCmVariationIdpSignout), nullptr},
#if !BUILDFLAG(IS_ANDROID)
{"- with desktop settings", kFedCmVariationDesktopSettings,
std::size(kFedCmVariationDesktopSettings), nullptr}
#endif // BUILDFLAG(IS_ANDROID)
};

#if BUILDFLAG(IS_CHROMEOS_ASH)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2845,11 +2845,8 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source,
"enablePaymentHandlerContentSetting",
base::FeatureList::IsEnabled(features::kServiceWorkerPaymentApps));

html_source->AddBoolean(
"enableFederatedIdentityApiContentSetting",
GetFieldTrialParamByFeatureAsBool(
features::kFedCm, features::kFedCmDesktopSettingsFieldTrialParamName,
false));
html_source->AddBoolean("enableFederatedIdentityApiContentSetting",
base::FeatureList::IsEnabled(features::kFedCm));

base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
html_source->AddBoolean(
Expand Down
4 changes: 1 addition & 3 deletions chrome/browser/ui/webui/settings/site_settings_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,7 @@ const std::vector<ContentSettingsType>& GetVisiblePermissionCategories() {
if (base::FeatureList::IsEnabled(::features::kServiceWorkerPaymentApps))
base_types->push_back(ContentSettingsType::PAYMENT_HANDLER);

if (GetFieldTrialParamByFeatureAsBool(
features::kFedCm,
features::kFedCmDesktopSettingsFieldTrialParamName, false)) {
if (base::FeatureList::IsEnabled(features::kFedCm)) {
base_types->push_back(ContentSettingsType::FEDERATED_IDENTITY_API);
}

Expand Down
6 changes: 0 additions & 6 deletions chrome/common/chrome_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,6 @@ const base::Feature kExtensionWorkflowJustification{
const base::Feature kExternalExtensionDefaultButtonControl{
"ExternalExtensionDefaultButtonControl", base::FEATURE_DISABLED_BY_DEFAULT};

#if !BUILDFLAG(IS_ANDROID)
// Field trial boolean parameter which indicates whether FedCM desktop settings
// are enabled.
const char kFedCmDesktopSettingsFieldTrialParamName[] = "DesktopSettings";
#endif // !BUILDFLAG(IS_ANDROID)

#if BUILDFLAG(ENABLE_PLUGINS)
// Show Flash deprecation warning to users who have manually enabled Flash.
// https://crbug.com/918428
Expand Down
5 changes: 0 additions & 5 deletions chrome/common/chrome_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,6 @@ extern const base::Feature kEnterpriseReportingInChromeOS;
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kExternalExtensionDefaultButtonControl;

#if !BUILDFLAG(IS_ANDROID)
COMPONENT_EXPORT(CHROME_FEATURES)
extern const char kFedCmDesktopSettingsFieldTrialParamName[];
#endif // !BUILDFLAG(IS_ANDROID)

#if BUILDFLAG(ENABLE_PLUGINS)
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kFlashDeprecationWarning;
Expand Down

0 comments on commit ed8d0c7

Please sign in to comment.