Commit 15706c98 authored by Finnur Thorarinsson's avatar Finnur Thorarinsson Committed by Chromium LUCI CQ

[Android]: IPH should be disabled when no experiment.

Minimum engagement score is optional, but, if
there's no experiment data specified, we must
make sure we do not default to 0 engagement score.

The intent was always to disable the feature if
no experiment is specified.

Bug: 1135551
Change-Id: I3cc82f970a7ce1559224ee75335539d298187be4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2614778
Auto-Submit: Finnur Thorarinsson <finnur@chromium.org>
Commit-Queue: Dominick Ng <dominickn@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841271}
parent 6cfb85e4
...@@ -793,7 +793,7 @@ public class AppBannerManagerTest { ...@@ -793,7 +793,7 @@ public class AppBannerManagerTest {
@Test @Test
@MediumTest @MediumTest
@Feature({"AppBanners"}) @Feature({"AppBanners"})
@CommandLineFlags.Add("enable-features=" + ChromeFeatureList.INSTALLABLE_AMBIENT_BADGE_INFOBAR) @CommandLineFlags.Add("enable-features=" + FeatureConstants.PWA_INSTALL_AVAILABLE_FEATURE)
public void testInProductHelp() throws Exception { public void testInProductHelp() throws Exception {
// Visit a site that is a PWA. The ambient badge should show. // Visit a site that is a PWA. The ambient badge should show.
String webBannerUrl = WebappTestPage.getServiceWorkerUrl(mTestServer); String webBannerUrl = WebappTestPage.getServiceWorkerUrl(mTestServer);
......
...@@ -452,6 +452,12 @@ base::string16 AppBannerManagerAndroid::GetAppName() const { ...@@ -452,6 +452,12 @@ base::string16 AppBannerManagerAndroid::GetAppName() const {
} }
bool AppBannerManagerAndroid::MaybeShowInProductHelp() const { bool AppBannerManagerAndroid::MaybeShowInProductHelp() const {
if (!base::FeatureList::IsEnabled(
feature_engagement::kIPHPwaInstallAvailableFeature)) {
DVLOG(2) << "Feature not enabled";
return false;
}
if (!web_contents()) { if (!web_contents()) {
DVLOG(2) << "IPH for PWA aborted: null WebContents"; DVLOG(2) << "IPH for PWA aborted: null WebContents";
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment