Chromium Code Reviews| 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_ || |