Skip to content

Commit

Permalink
Disable FedCM functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahrotahn committed May 20, 2024
1 parent f3c40f8 commit 78ebf88
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6748,3 +6748,37 @@
// TODO(crbug.com/40904479): Maybe move to chrome_syncable_prefs_database.cc,
// see bug.
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
--- a/content/browser/webid/federated_auth_request_impl.cc
+++ b/content/browser/webid/federated_auth_request_impl.cc
@@ -579,31 +579,6 @@ FederatedAuthRequestImpl::~FederatedAuth
void FederatedAuthRequestImpl::Create(
RenderFrameHost* host,
mojo::PendingReceiver<blink::mojom::FederatedAuthRequest> receiver) {
- CHECK(host);
-
- BrowserContext* browser_context = host->GetBrowserContext();
- raw_ptr<FederatedIdentityApiPermissionContextDelegate>
- api_permission_context =
- browser_context->GetFederatedIdentityApiPermissionContext();
- raw_ptr<FederatedIdentityAutoReauthnPermissionContextDelegate>
- auto_reauthn_permission_context =
- browser_context->GetFederatedIdentityAutoReauthnPermissionContext();
- raw_ptr<FederatedIdentityPermissionContextDelegate> permission_context =
- browser_context->GetFederatedIdentityPermissionContext();
- raw_ptr<IdentityRegistry> identity_registry =
- IdentityRegistry::FromWebContents(WebContents::FromRenderFrameHost(host));
-
- if (!api_permission_context || !auto_reauthn_permission_context ||
- !permission_context) {
- return;
- }
-
- // FederatedAuthRequestImpl owns itself. It will self-destruct when a mojo
- // interface error occurs, the RenderFrameHost is deleted, or the
- // RenderFrameHost navigates to a new document.
- new FederatedAuthRequestImpl(
- *host, api_permission_context, auto_reauthn_permission_context,
- permission_context, identity_registry, std::move(receiver));
}

FederatedAuthRequestImpl& FederatedAuthRequestImpl::CreateForTesting(
12 changes: 12 additions & 0 deletions patches/extra/ungoogled-chromium/remove-uneeded-ui.patch
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# the feedback entry in the third party cookie popup
# unneeded elements from the profile menu
# the 'Learn more' link on crashed tabs
# the Third-party sign-in site settings (FedCM)
# disable LiveCaption flag by default, this also removes non-functional Live Caption checkbox from media controls
# the new feature badges

Expand Down Expand Up @@ -447,6 +448,17 @@

void SadTabView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
// Specify the maximum message and title width explicitly.
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -3238,7 +3238,7 @@ void AddSiteSettingsStrings(content::Web
base::FeatureList::IsEnabled(blink::features::kWebPrinting));

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

base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
html_source->AddBoolean(
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -938,7 +938,7 @@ BASE_FEATURE(kOnDeviceWebSpeech,
Expand Down

0 comments on commit 78ebf88

Please sign in to comment.