Skip to content

Commit

Permalink
Disable GetInstalledRelatedApps API: removes the possibility of fetch…
Browse files Browse the repository at this point in the history
…ing installed PWAs and UWPs applications in android and windows
  • Loading branch information
uazo committed Jul 30, 2024
1 parent ab909cc commit cdcf970
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions build/patches/Disable-GetInstalledRelatedApps-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ Subject: Disable GetInstalledRelatedApps API

License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
.../components/installedapp/InstalledAppProviderImpl.java | 1 +
content/browser/installedapp/installed_app_provider_impl.cc | 2 +-
.../content_features_cc/Disable-GetInstalledRelatedApps-API.inc | 2 ++
.../blink/renderer/platform/runtime_enabled_features.json5 | 2 +-
4 files changed, 5 insertions(+), 2 deletions(-)
.../components/installedapp/InstalledAppProviderImpl.java | 1 +
.../browser/installedapp/installed_app_provider_impl.cc | 2 +-
.../features_cc/Disable-GetInstalledRelatedApps-API.inc | 8 ++++++++
.../Disable-GetInstalledRelatedApps-API.inc | 2 ++
.../renderer/platform/runtime_enabled_features.json5 | 2 +-
5 files changed, 13 insertions(+), 2 deletions(-)
create mode 100644 cromite_flags/content/common/features_cc/Disable-GetInstalledRelatedApps-API.inc
create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-GetInstalledRelatedApps-API.inc

diff --git a/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java b/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java
Expand All @@ -34,6 +36,19 @@ diff --git a/content/browser/installedapp/installed_app_provider_impl.cc b/conte
base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
FROM_HERE,
base::BindOnce(std::move(callback),
diff --git a/cromite_flags/content/common/features_cc/Disable-GetInstalledRelatedApps-API.inc b/cromite_flags/content/common/features_cc/Disable-GetInstalledRelatedApps-API.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/content/common/features_cc/Disable-GetInstalledRelatedApps-API.inc
@@ -0,0 +1,8 @@
+SET_CROMITE_FEATURE_DISABLED(kFilterInstalledAppsWebAppMatching);
+
+#if BUILDFLAG(IS_WIN)
+
+SET_CROMITE_FEATURE_DISABLED(kFilterInstalledAppsWinMatching);
+
+#endif
+
diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-GetInstalledRelatedApps-API.inc b/cromite_flags/content/public/common/content_features_cc/Disable-GetInstalledRelatedApps-API.inc
new file mode 100644
--- /dev/null
Expand Down

0 comments on commit cdcf970

Please sign in to comment.