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

Issue 2259553002: Make AppBannerInfoBar install WebAPK. (Closed)

Created:
4 years, 4 months ago by Xi Han
Modified:
4 years, 3 months ago
Reviewers:
dominickn, pkotwicz, Yaron, gone
CC:
chromium-reviews, dominickn+watch_chromium.org, dfalcantara+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make AppBannerInfoBar install WebAPK. On UI, the text for installing a WebAPK in the App Banner is: 1) "Add to Homescreen" -> "Adding" -> "Open" for a sucessful installation 2) "Add to Homescreen" -> "Adding" -> "Unable to save" toast for an unsucessful installation. WebAPK-specific logic is added to AppBannerInfobarDelegateAndroid to show the above text. Besides, checking whether a site is WebAPK Compattive is based on 1) installable check + 2) url is over "https" + 3) WebAPK is enabled on command line. Currently, WebAPK is installed as an untrusted source with Android installation dialog pops up. User could choose cancel the installation even after the WebAPK has been downloaded locally. To detect the cancel behavior, AppBannerInfobarDelegateAndroid checks whether the WebAPK has been installed or not after Chrome is resumed. This isn't an ideal way, but it seems we can't find a better way to detect the cancel event. This logic will be removed when WebAPK is installed by Play soon. This CL disables creating WebAPKs by selecting add-to-homescreen from the app menu. Instead, in a follow up CL, selecting from the app menu will make the app banner info bar shown to install WebAPKs. BUG=627250 Committed: https://crrev.com/9f38f74bb0feebf033b9ddd9e28ffe78d067a356 Cr-Commit-Position: refs/heads/master@{#415365}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Rebase. #

Total comments: 7

Patch Set 3 : Move logic to WebApkInstaller. #

Total comments: 49

Patch Set 4 : Remove webpak-metrics and nits. #

Total comments: 28

Patch Set 5 : Another round of comments. #

Patch Set 6 : Add a TODO. #

Total comments: 6

Patch Set 7 : dfalcantara@'s comments. #

Total comments: 2

Patch Set 8 : Nits. #

Total comments: 31

Patch Set 9 : Nits #

Patch Set 10 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+439 lines, -160 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java View 1 2 3 4 5 6 7 8 5 chunks +21 lines, -9 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarDelegateAndroid.java View 1 2 3 4 5 6 7 8 7 chunks +71 lines, -6 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java View 1 2 3 4 5 6 7 8 5 chunks +93 lines, -29 lines 0 comments Download
M chrome/android/java/strings/android_chrome_strings.grd View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/android/banners/app_banner_infobar_delegate_android.h View 1 2 3 4 3 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/android/banners/app_banner_infobar_delegate_android.cc View 1 2 3 4 5 6 7 8 6 chunks +131 lines, -40 lines 0 comments Download
M chrome/browser/android/banners/app_banner_manager_android.cc View 1 2 3 4 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/android/shortcut_helper.h View 1 2 3 chunks +3 lines, -10 lines 0 comments Download
M chrome/browser/android/shortcut_helper.cc View 1 2 3 3 chunks +3 lines, -17 lines 0 comments Download
M chrome/browser/android/webapk/webapk_installer.h View 1 2 3 4 5 6 7 chunks +25 lines, -14 lines 0 comments Download
M chrome/browser/android/webapk/webapk_installer.cc View 1 2 3 4 5 6 7 8 10 chunks +45 lines, -22 lines 0 comments Download
M chrome/browser/android/webapk/webapk_installer_unittest.cc View 1 2 3 4 5 6 3 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/android/webapk/webapk_update_manager.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/webapk/webapk_update_manager.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/android/infobars/app_banner_infobar_android.h View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/android/infobars/app_banner_infobar_android.cc View 1 2 2 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 53 (32 generated)
Xi Han
Hi Peter, please take a look, thanks! https://codereview.chromium.org/2259553002/diff/100001/chrome/browser/android/banners/app_banner_manager_android.cc File chrome/browser/android/banners/app_banner_manager_android.cc (right): https://codereview.chromium.org/2259553002/diff/100001/chrome/browser/android/banners/app_banner_manager_android.cc#newcode44 chrome/browser/android/banners/app_banner_manager_android.cc:44: const base::CommandLine* ...
4 years, 4 months ago (2016-08-19 12:50:09 UTC) #8
pkotwicz
Xi thank you for taking this task on! This is one of the last remaining ...
4 years, 4 months ago (2016-08-19 22:17:37 UTC) #18
dominickn
I have some quick comments. Peter's suggestion to try and minimize the WebAPK specific code ...
4 years, 4 months ago (2016-08-20 23:44:08 UTC) #19
dominickn
https://codereview.chromium.org/2259553002/diff/200001/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java File chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java (right): https://codereview.chromium.org/2259553002/diff/200001/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java#newcode144 chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java:144: if (mButton == null || mAppData == null && ...
4 years, 3 months ago (2016-08-25 04:25:56 UTC) #23
pkotwicz
Mostly nits Thank you for moving the install monitoring logic into WebApkInstaller.java! I know that ...
4 years, 3 months ago (2016-08-25 22:23:16 UTC) #24
Xi Han
PTAL, thanks! https://codereview.chromium.org/2259553002/diff/200001/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java File chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java (right): https://codereview.chromium.org/2259553002/diff/200001/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java#newcode144 chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java:144: if (mButton == null || mAppData == ...
4 years, 3 months ago (2016-08-26 17:04:18 UTC) #31
dominickn
https://codereview.chromium.org/2259553002/diff/240001/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc File chrome/browser/android/banners/app_banner_infobar_delegate_android.cc (right): https://codereview.chromium.org/2259553002/diff/240001/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc#newcode86 chrome/browser/android/banners/app_banner_infobar_delegate_android.cc:86: AppBannerInfoBarDelegateAndroid::~AppBannerInfoBarDelegateAndroid() { Add weak_ptr_factory_.InvalidateWeakPtrs(); here to ensure that all ...
4 years, 3 months ago (2016-08-26 19:19:34 UTC) #32
gone
Don't know if I was explicitly asked to review this, but here goes. https://chromiumcodereview.appspot.com/2259553002/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarDelegateAndroid.java File ...
4 years, 3 months ago (2016-08-26 21:12:27 UTC) #33
pkotwicz
A few nits https://codereview.chromium.org/2259553002/diff/200001/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc File chrome/browser/android/banners/app_banner_infobar_delegate_android.cc (right): https://codereview.chromium.org/2259553002/diff/200001/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc#newcode324 chrome/browser/android/banners/app_banner_infobar_delegate_android.cc:324: UpdateInstallState(env, nullptr); I didn't realize that ...
4 years, 3 months ago (2016-08-26 22:31:25 UTC) #34
Xi Han
Dominick, Peter, and Dan: PTAL, thanks! @Dan: I was suggested to add reviewers one by ...
4 years, 3 months ago (2016-08-29 14:44:53 UTC) #37
gone
I initially reviewed it because someone added me as a reviewer, making it show up ...
4 years, 3 months ago (2016-08-29 17:24:10 UTC) #38
Xi Han
Hi Dan: PTAL, thanks! https://codereview.chromium.org/2259553002/diff/320001/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarDelegateAndroid.java File chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarDelegateAndroid.java (right): https://codereview.chromium.org/2259553002/diff/320001/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarDelegateAndroid.java#newcode115 chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarDelegateAndroid.java:115: } catch (ActivityNotFoundException e) { ...
4 years, 3 months ago (2016-08-29 17:55:46 UTC) #39
gone
lgtm on my end, but you need to wait for Dominick since he already started ...
4 years, 3 months ago (2016-08-29 17:58:17 UTC) #40
Xi Han
Thanks Dan! Yes, I am waiting for their comments back. Dominick & Peter, PTAL, thanks! ...
4 years, 3 months ago (2016-08-29 18:02:01 UTC) #41
dominickn
lgtm % nits https://codereview.chromium.org/2259553002/diff/360001/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc File chrome/browser/android/banners/app_banner_infobar_delegate_android.cc (right): https://codereview.chromium.org/2259553002/diff/360001/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc#newcode26 chrome/browser/android/banners/app_banner_infobar_delegate_android.cc:26: #include "content/public/browser/browser_thread.h" Nit: is this include ...
4 years, 3 months ago (2016-08-29 23:31:30 UTC) #42
pkotwicz
LGTM with nits. Thank you for bearing with me! https://codereview.chromium.org/2259553002/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java (right): https://codereview.chromium.org/2259553002/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java#newcode108 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java:108: ...
4 years, 3 months ago (2016-08-30 04:06:24 UTC) #43
pkotwicz
LGTM with nits. Thank you for bearing with me! https://codereview.chromium.org/2259553002/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java (right): https://codereview.chromium.org/2259553002/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java#newcode108 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java:108: ...
4 years, 3 months ago (2016-08-30 04:06:24 UTC) #44
Xi Han
https://codereview.chromium.org/2259553002/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java (right): https://codereview.chromium.org/2259553002/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java#newcode108 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java:108: mInstallTask = null; On 2016/08/30 04:06:23, pkotwicz wrote: > ...
4 years, 3 months ago (2016-08-30 17:49:29 UTC) #46
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/2259553002/420001
4 years, 3 months ago (2016-08-30 17:54:20 UTC) #49
commit-bot: I haz the power
Committed patchset #10 (id:420001)
4 years, 3 months ago (2016-08-30 18:34:41 UTC) #51
commit-bot: I haz the power
4 years, 3 months ago (2016-08-30 18:37:16 UTC) #53
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/9f38f74bb0feebf033b9ddd9e28ffe78d067a356
Cr-Commit-Position: refs/heads/master@{#415365}

Powered by Google App Engine
This is Rietveld 408576698