Replace Disable all promo dialogs
This commit is contained in:
@@ -1,34 +1,33 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Tue, 12 Jun 2018 15:09:26 +0200
|
||||
Subject: Disable all promo dialogs
|
||||
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
.../chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
.../chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java | 1 +
|
||||
components/user_education/common/feature_promo_registry.cc | 1 +
|
||||
2 files changed, 2 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
|
||||
@@ -893,7 +893,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
|
||||
* displayed.
|
||||
*/
|
||||
private boolean triggerPromo(boolean intentWithEffect) {
|
||||
- try (TraceEvent e = TraceEvent.scoped("TabbedRootUiCoordinator.triggerPromo")) {
|
||||
+ /*try (TraceEvent e = TraceEvent.scoped("TabbedRootUiCoordinator.triggerPromo")) {
|
||||
if (CommandLine.getInstance().hasSwitch(ChromeSwitches.DISABLE_STARTUP_PROMOS)) {
|
||||
return false;
|
||||
}
|
||||
@@ -917,8 +917,8 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
|
||||
preferenceManager.writeBoolean(
|
||||
ChromePreferenceKeys.PROMOS_SKIPPED_ON_FIRST_START, true);
|
||||
}
|
||||
- return isShowingPromo;
|
||||
- }
|
||||
+ return isShowingPromo; } */
|
||||
+ return false;
|
||||
@@ -946,6 +946,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
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/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
|
||||
|
||||
Reference in New Issue
Block a user