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

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

Issue 2957523003: Start banner pipeline immediately after navigating, if enough engagement (Closed)
Patch Set: Simpler per Dom's suggestion Created 3 years, 6 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 | « no previous file | chrome/browser/banners/app_banner_manager_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/banners/app_banner_manager.cc
diff --git a/chrome/browser/banners/app_banner_manager.cc b/chrome/browser/banners/app_banner_manager.cc
index d60e013bc216402d065ec97ab526b5f66640a69c..ea650feb6c9889ab7f9736c4f13220a062f63f56 100644
--- a/chrome/browser/banners/app_banner_manager.cc
+++ b/chrome/browser/banners/app_banner_manager.cc
@@ -428,8 +428,13 @@ void AppBannerManager::DidFinishLoad(
// If the bypass flag is on, or if we require no engagement to trigger the
// banner, the rest of the banner pipeline should operate as if the engagement
// threshold has been met.
- if (AppBannerSettingsHelper::HasSufficientEngagement(0))
+ // Additionally, if the page already has enough engagement, trigger the
+ // pipeline immediately.
+ if (AppBannerSettingsHelper::HasSufficientEngagement(0) ||
+ AppBannerSettingsHelper::HasSufficientEngagement(
+ GetSiteEngagementService()->GetScore(validated_url))) {
has_sufficient_engagement_ = true;
+ }
// Start the pipeline immediately if we pass (or bypass) the engagement check,
// or if the feature to run the installability check on page load is enabled.
« no previous file with comments | « no previous file | chrome/browser/banners/app_banner_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698