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

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

Issue 2957523003: Start banner pipeline immediately after navigating, if enough engagement (Closed)
Patch Set: 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..10c6c92ca7e1fed9bcd688c5fea7d368e775571d 100644
--- a/chrome/browser/banners/app_banner_manager.cc
+++ b/chrome/browser/banners/app_banner_manager.cc
@@ -431,6 +431,15 @@ void AppBannerManager::DidFinishLoad(
if (AppBannerSettingsHelper::HasSufficientEngagement(0))
has_sufficient_engagement_ = true;
+ // If the page already has enough engagement, trigger the pipeline
+ // immediately.
+ if (AppBannerSettingsHelper::HasSufficientEngagement(
+ SiteEngagementService::Get(
dominickn 2017/06/23 04:55:35 This is called quite a lot. Instead, just have a s
dominickn 2017/06/23 04:57:44 That might also let you combine this if statement
benwells 2017/06/23 05:12:04 Done.
benwells 2017/06/23 05:12:04 Done.
+ Profile::FromBrowserContext(web_contents()->GetBrowserContext()))
+ ->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.
if (has_sufficient_engagement_ ||
« 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