From 67166a9acdc1dc4f06a3df022216086f26ae54c4 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 23 Jul 2025 08:42:44 +0200 Subject: [PATCH] Disable all promo dialogs: fix crash on right-clicking fields of login forms in desktop platforms (#2208) --- build/patches/Disable-all-promo-dialogs.patch | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/build/patches/Disable-all-promo-dialogs.patch b/build/patches/Disable-all-promo-dialogs.patch index e92a0c8d..cc6936e7 100644 --- a/build/patches/Disable-all-promo-dialogs.patch +++ b/build/patches/Disable-all-promo-dialogs.patch @@ -9,10 +9,11 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../views/profiles/profile_picker_feature_promo_controller.cc | 1 + .../user_education/impl/browser_feature_promo_controller_20.cc | 1 + .../chrome/browser/user_education/UserEducationHelper.java | 1 + + .../browser/user_education/user_education_service_factory.cc | 1 + .../common/feature_promo/feature_promo_registry.cc | 2 ++ .../common/feature_promo/impl/feature_promo_controller_20.cc | 1 + .../common/feature_promo/impl/feature_promo_controller_25.cc | 3 ++- - 8 files changed, 10 insertions(+), 2 deletions(-) + 9 files changed, 11 insertions(+), 2 deletions(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java @@ -70,6 +71,17 @@ diff --git a/chrome/browser/user_education/java/src/org/chromium/chrome/browser/ // Activity was destroyed; don't show IPH. View anchorView = iphCommand.anchorView; if (mActivity == null +diff --git a/chrome/browser/user_education/user_education_service_factory.cc b/chrome/browser/user_education/user_education_service_factory.cc +--- a/chrome/browser/user_education/user_education_service_factory.cc ++++ b/chrome/browser/user_education/user_education_service_factory.cc +@@ -109,6 +109,7 @@ UserEducationServiceFactory::BuildServiceInstanceForBrowserContextImpl( + + // static + bool UserEducationServiceFactory::ProfileAllowsUserEducation(Profile* profile) { ++ if ((true)) return false; + #if BUILDFLAG(CHROME_FOR_TESTING) + // IPH is always disabled in Chrome for Testing. + return false; diff --git a/components/user_education/common/feature_promo/feature_promo_registry.cc b/components/user_education/common/feature_promo/feature_promo_registry.cc --- a/components/user_education/common/feature_promo/feature_promo_registry.cc +++ b/components/user_education/common/feature_promo/feature_promo_registry.cc