Commit 7f20516e authored by benwells's avatar benwells Committed by Commit bot

Modify behavior of --bypass-app-banner-engagement-checks flag.

This flag now does not bypass the checks for whether the app has been
added to the homescreen or not.

BUG=467374

Review URL: https://codereview.chromium.org/1011963003

Cr-Commit-Position: refs/heads/master@{#320968}
parent 0bfeabec
......@@ -180,11 +180,6 @@ bool AppBannerSettingsHelper::ShouldShowBanner(
const GURL& origin_url,
const std::string& package_name_or_start_url,
base::Time time) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kBypassAppBannerEngagementChecks)) {
return true;
}
// Don't show if it has been added to the homescreen.
base::Time added_time =
GetSingleBannerEvent(web_contents, origin_url, package_name_or_start_url,
......@@ -194,6 +189,12 @@ bool AppBannerSettingsHelper::ShouldShowBanner(
return false;
}
// Otherwise, ignore all checks if the flag to do so is set.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kBypassAppBannerEngagementChecks)) {
return true;
}
base::Time blocked_time =
GetSingleBannerEvent(web_contents, origin_url, package_name_or_start_url,
APP_BANNER_EVENT_DID_BLOCK);
......
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