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

Issue 2778983005: Allow the app banner installability check to run on page load. (Closed)

Created:
3 years, 8 months ago by dominickn
Modified:
3 years, 8 months ago
CC:
chromium-reviews, dominickn+watch_chromium.org, lizeb+watch-custom-tabs_chromium.org, pkotwicz+watch_chromium.org, asvitkine+watch_chromium.org, agrieve+watch_chromium.org, zpeng+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow the app banner installability check to run on page load. This CL implements a feature to control when the app banner installability check is run - when the site accumulates sufficient engagement (current default), or on every page load. Significant refactoring of the AppBannerManager's internal state and new tests are added to support this functionality. New metrics are introduced in the installable manager to measure the state of the installability check when the Android menu / add to homescreen menu item are used. These metrics will be used to measure the impact of running app banner checks as they are now / on page load in determining how often we know that a site is a PWA when the user interacts with the menu. BUG=704369 Review-Url: https://codereview.chromium.org/2778983005 Cr-Commit-Position: refs/heads/master@{#461967} Committed: https://chromium.googlesource.com/chromium/src/+/c2d4ff6157a4d06bd06089b872e0bc8a81068853

Patch Set 1 #

Total comments: 35

Patch Set 2 : Address comments #

Patch Set 3 : Rebase #

Patch Set 4 : Address comments #

Patch Set 5 : Fix enum in test + minor improvements #

Total comments: 15

Patch Set 6 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+572 lines, -77 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java View 2 chunks +9 lines, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/banners/AppBannerManager.java View 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java View 1 2 3 4 2 chunks +18 lines, -0 lines 0 comments Download
M chrome/browser/BUILD.gn View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/android/banners/app_banner_manager_android.h View 1 chunk +12 lines, -1 line 0 comments Download
M chrome/browser/android/banners/app_banner_manager_android.cc View 1 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/browser/banners/app_banner_manager.h View 1 5 chunks +40 lines, -8 lines 0 comments Download
M chrome/browser/banners/app_banner_manager.cc View 1 14 chunks +76 lines, -52 lines 0 comments Download
M chrome/browser/banners/app_banner_manager_browsertest.cc View 1 8 chunks +171 lines, -6 lines 0 comments Download
M chrome/browser/engagement/site_engagement_service.h View 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/installable/installable_manager.h View 1 2 3 4 5 3 chunks +22 lines, -0 lines 0 comments Download
M chrome/browser/installable/installable_manager.cc View 1 2 3 4 5 5 chunks +75 lines, -3 lines 0 comments Download
M chrome/browser/installable/installable_manager_browsertest.cc View 1 2 3 4 5 22 chunks +31 lines, -3 lines 0 comments Download
A chrome/browser/installable/installable_metrics.h View 1 2 3 4 5 1 chunk +26 lines, -0 lines 0 comments Download
A chrome/browser/installable/installable_metrics.cc View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
M chrome/common/chrome_features.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_features.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 2 chunks +28 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (33 generated)
dominickn
WDYT? This looks big, but fully half the change is JNI plumbing and tests.
3 years, 8 months ago (2017-03-29 05:41:36 UTC) #4
benwells
Looks really nice, I'm feeling about this. Hopefully moving to onload checking won't be too ...
3 years, 8 months ago (2017-03-30 08:22:37 UTC) #9
benwells
lol .. missed an important word .. I'm feeling *good* about this...
3 years, 8 months ago (2017-03-30 08:23:13 UTC) #10
pkotwicz
https://codereview.chromium.org/2778983005/diff/1/chrome/browser/installable/installable_manager.cc File chrome/browser/installable/installable_manager.cc (right): https://codereview.chromium.org/2778983005/diff/1/chrome/browser/installable/installable_manager.cc#newcode345 chrome/browser/installable/installable_manager.cc:345: : InstallableMetrics::IN_PROGRESS_NON_PWA; What is the value of having both ...
3 years, 8 months ago (2017-03-30 20:48:25 UTC) #11
dominickn
Thanks! https://codereview.chromium.org/2778983005/diff/1/chrome/browser/banners/app_banner_manager.cc File chrome/browser/banners/app_banner_manager.cc (right): https://codereview.chromium.org/2778983005/diff/1/chrome/browser/banners/app_banner_manager.cc#newcode74 chrome/browser/banners/app_banner_manager.cc:74: if (IsActive()) { On 2017/03/30 08:22:37, benwells wrote: ...
3 years, 8 months ago (2017-03-30 23:42:53 UTC) #14
benwells
lgtm https://codereview.chromium.org/2778983005/diff/1/chrome/browser/banners/app_banner_manager.cc File chrome/browser/banners/app_banner_manager.cc (right): https://codereview.chromium.org/2778983005/diff/1/chrome/browser/banners/app_banner_manager.cc#newcode74 chrome/browser/banners/app_banner_manager.cc:74: if (IsActive()) { On 2017/03/30 23:42:52, dominickn wrote: ...
3 years, 8 months ago (2017-03-31 04:00:35 UTC) #21
pkotwicz
https://codereview.chromium.org/2778983005/diff/1/chrome/browser/installable/installable_manager.cc File chrome/browser/installable/installable_manager.cc (right): https://codereview.chromium.org/2778983005/diff/1/chrome/browser/installable/installable_manager.cc#newcode345 chrome/browser/installable/installable_manager.cc:345: : InstallableMetrics::IN_PROGRESS_NON_PWA; I understand. In this case the code ...
3 years, 8 months ago (2017-03-31 04:12:37 UTC) #22
dominickn
Thanks! benwells: can you take one more look? There were some subtle changes to metrics ...
3 years, 8 months ago (2017-03-31 04:59:18 UTC) #28
pkotwicz
LGTM with nits https://codereview.chromium.org/2778983005/diff/80001/chrome/browser/installable/installable_manager.cc File chrome/browser/installable/installable_manager.cc (right): https://codereview.chromium.org/2778983005/diff/80001/chrome/browser/installable/installable_manager.cc#newcode191 chrome/browser/installable/installable_manager.cc:191: DCHECK_EQ(0, menu_item_count_); Personally, I would remove ...
3 years, 8 months ago (2017-03-31 05:07:44 UTC) #29
benwells
still lgtm. tbh i preferred the previous, longer variable names. menu_item_count implies something totally different. ...
3 years, 8 months ago (2017-03-31 05:35:28 UTC) #30
Ilya Sherman
Metrics LGTM % nits: https://codereview.chromium.org/2778983005/diff/80001/chrome/browser/installable/installable_metrics.cc File chrome/browser/installable/installable_metrics.cc (right): https://codereview.chromium.org/2778983005/diff/80001/chrome/browser/installable/installable_metrics.cc#newcode13 chrome/browser/installable/installable_metrics.cc:13: "Webapp.InstallabilityCheckStatus.MenuItemAddToHomescreen"; Optional nit: I would ...
3 years, 8 months ago (2017-03-31 17:03:16 UTC) #33
dominickn
Thanks! https://codereview.chromium.org/2778983005/diff/80001/chrome/browser/installable/installable_manager.cc File chrome/browser/installable/installable_manager.cc (right): https://codereview.chromium.org/2778983005/diff/80001/chrome/browser/installable/installable_manager.cc#newcode191 chrome/browser/installable/installable_manager.cc:191: DCHECK_EQ(0, menu_item_count_); On 2017/03/31 05:35:28, benwells wrote: > ...
3 years, 8 months ago (2017-04-03 00:06:46 UTC) #36
gone
Java stuff lgtm
3 years, 8 months ago (2017-04-04 21:28:15 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2778983005/100001
3 years, 8 months ago (2017-04-04 23:56:16 UTC) #42
commit-bot: I haz the power
Prior attempt to commit was detected, but we were not able to check whether the ...
3 years, 8 months ago (2017-04-05 03:14:14 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2778983005/100001
3 years, 8 months ago (2017-04-05 03:20:51 UTC) #47
commit-bot: I haz the power
3 years, 8 months ago (2017-04-05 03:29:09 UTC) #50
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/c2d4ff6157a4d06bd06089b872e0...

Powered by Google App Engine
This is Rietveld 408576698