Files
cromite/build/patches/Disable-all-promo-dialogs.patch
T

46 lines
2.5 KiB
Diff

From: uazo <uazo@users.noreply.github.com>
Date: Tue, 12 Jun 2018 15:09:26 +0200
Subject: Disable all promo dialogs
---
.../chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java | 1 +
.../ui/views/user_education/browser_feature_promo_controller.cc | 1 +
components/user_education/common/feature_promo_registry.cc | 1 +
3 files changed, 3 insertions(+)
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
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
@@ -959,6 +959,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
}
private boolean maybeShowPromo() {
+ if ((true)) return false;
// Only one promo can be shown in one run to avoid nagging users too much.
if (FullScreenSyncPromoUtil.launchPromoIfNeeded(mActivity,
SyncConsentActivityLauncherImpl.get(), VersionInfo.getProductMajorVersion())) {
diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc
--- a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc
+++ b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc
@@ -63,6 +63,7 @@ ui::ElementContext BrowserFeaturePromoController::GetAnchorContext() const {
bool BrowserFeaturePromoController::CanShowPromo(
ui::TrackedElement* anchor_element) const {
+ if ((true)) return false;
// Temporarily turn off IPH in incognito as a concern was raised that
// the IPH backend ignores incognito and writes to the parent profile.
// See https://bugs.chromium.org/p/chromium/issues/detail?id=1128728#c30
diff --git a/components/user_education/common/feature_promo_registry.cc b/components/user_education/common/feature_promo_registry.cc
--- a/components/user_education/common/feature_promo_registry.cc
+++ b/components/user_education/common/feature_promo_registry.cc
@@ -26,6 +26,7 @@ const FeaturePromoSpecification* FeaturePromoRegistry::GetParamsForFeature(
}
void FeaturePromoRegistry::RegisterFeature(FeaturePromoSpecification spec) {
+ if ((true)) return;
const base::Feature* const iph_feature = spec.feature();
CHECK(iph_feature);
const auto result = feature_promo_data_.emplace(iph_feature, std::move(spec));
--
2.25.1