Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4342)

Unified Diff: chrome/browser/banners/app_banner_settings_helper.cc

Issue 2620613006: Check if a PWA is installed before checking the service worker and icon. (Closed)
Patch Set: Add missing enum value Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/banners/app_banner_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/banners/app_banner_settings_helper.cc
diff --git a/chrome/browser/banners/app_banner_settings_helper.cc b/chrome/browser/banners/app_banner_settings_helper.cc
index f314a0c804ea8263f0a0088e6fc3cde25fa20520..2898939505149379e8381e3ca499f0e0f23250d2 100644
--- a/chrome/browser/banners/app_banner_settings_helper.cc
+++ b/chrome/browser/banners/app_banner_settings_helper.cc
@@ -246,12 +246,6 @@ InstallableStatusCode AppBannerSettingsHelper::ShouldShowBanner(
const GURL& origin_url,
const std::string& package_name_or_start_url,
base::Time time) {
- // Ignore all checks if the flag to do so is set.
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kBypassAppBannerEngagementChecks)) {
- return NO_ERROR_DETECTED;
- }
-
// Never show a banner when the package name or URL is empty.
if (package_name_or_start_url.empty())
return PACKAGE_NAME_OR_START_URL_EMPTY;
@@ -277,9 +271,8 @@ InstallableStatusCode AppBannerSettingsHelper::ShouldShowBanner(
base::Time shown_time =
GetSingleBannerEvent(web_contents, origin_url, package_name_or_start_url,
APP_BANNER_EVENT_DID_SHOW);
- if (time - shown_time < base::TimeDelta::FromDays(gDaysAfterIgnoredToShow)) {
+ if (time - shown_time < base::TimeDelta::FromDays(gDaysAfterIgnoredToShow))
return PREVIOUSLY_IGNORED;
- }
return NO_ERROR_DETECTED;
}
« no previous file with comments | « chrome/browser/banners/app_banner_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698