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 2969143002: Fixes redirects to external apps when navigating from PWA. (Closed)

Created:
3 years, 5 months ago by piotrs
Modified:
3 years, 5 months ago
Reviewers:
dominickn, Ted C, Yusuf
CC:
chromium-reviews, dominickn+watch_chromium.org, pkotwicz+watch_chromium.org, zpeng+watch_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixes the redirect to external apps when navigating from PWA. This is done with avoiding explicit chrome package name (using component name instead) and using EXTRA_SEND_TO_EXTERNAL_DEFAULT_HANDLER on the intent. With this patch the redirect works, however it takes a long time for CCT to consult ExternalNavigationHandler. This results in suboptimal UX. Same redirect in ChromeTabbedActivity is almost instantaneous. Result is that for _blank links CCT shows up briefly before redirecting to an external app. In a follow up it should be investigated why it is the case and if it cannot be improved, we might need to bypass CCT in such case, which would diverge from existing navigation paths for _blank links in Clank. BUG=740402 Review-Url: https://codereview.chromium.org/2969143002 Cr-Original-Original-Commit-Position: refs/heads/master@{#485831} Committed: https://chromium.googlesource.com/chromium/src/+/727468b41b2fe48bf73983ab0c3aa2632b47d89e Review-Url: https://codereview.chromium.org/2969143002 Cr-Original-Commit-Position: refs/heads/master@{#486275} Committed: https://chromium.googlesource.com/chromium/src/+/4dbcecfb630ac1a2dba1910f0e429b82bf3a0b5f Review-Url: https://codereview.chromium.org/2969143002 Cr-Commit-Position: refs/heads/master@{#488228} Committed: https://chromium.googlesource.com/chromium/src/+/471df3926c09fda0af15d9157eb29bd326b0f9fc

Patch Set 1 #

Total comments: 5

Patch Set 2 : Addressed comments #

Patch Set 3 : Merge #

Total comments: 7

Patch Set 4 : Removed TopActivityListener #

Total comments: 1

Patch Set 5 : Rename of util method in test (s/AppPicker/IntentPicker/) #

Patch Set 6 : Merge #

Patch Set 7 : Correcting the WebApkIntegrationTest test #

Patch Set 8 : Merge #

Patch Set 9 : Merge #

Patch Set 10 : Increasing the timeut and adding logging to figure out the waterfall errors #

Patch Set 11 : Sends intents to specialized apps in WebappTabDelegate (and merge) #

Total comments: 4

Patch Set 12 : No longer instantiates ExternalNavigationDelegateImpl, uses static calls instead #

Patch Set 13 : Merge #

Patch Set 14 : Fix for Marshmallow #

Patch Set 15 : Merge #

Patch Set 16 : Strict mode disk read violation workaround for PackageManager#queryIntentActivities() #

Patch Set 17 : Start activity from WebappActivity reference #

Patch Set 18 : Merge #

Patch Set 19 : Loosen strict mode, as it is stil violated #

Patch Set 20 : Fix #

Messages

Total messages: 177 (122 generated)
piotrs
Hi folks, a small fix that allows the redirect to native apps for PWAs. Should ...
3 years, 5 months ago (2017-07-07 05:48:01 UTC) #33
dominickn
This looks fine to me % nits, but I'll defer to Yusuf since this is ...
3 years, 5 months ago (2017-07-07 05:56:04 UTC) #34
pkotwicz
Piotr, can you please file a separate bug for this CL? A pet peeve of ...
3 years, 5 months ago (2017-07-07 14:05:05 UTC) #37
Yusuf
lgtm https://codereview.chromium.org/2969143002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java (right): https://codereview.chromium.org/2969143002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java#newcode37 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java:37: intent.putExtra(CustomTabIntentDataProvider.EXTRA_SEND_TO_EXTERNAL_DEFAULT_HANDLER, true); Good investigation finding out about this! ...
3 years, 5 months ago (2017-07-07 20:50:03 UTC) #38
piotrs
Thanks all. @pkotwicz: Create a separate bug for this, thanks for feedback and sorry for ...
3 years, 5 months ago (2017-07-09 23:43:38 UTC) #43
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/2969143002/160001
3 years, 5 months ago (2017-07-10 00:43:30 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/484050)
3 years, 5 months ago (2017-07-10 00:54:54 UTC) #50
piotrs
Hi all, Dominick, can you consider LGTM for webapps/ directory. Ted, can you please take ...
3 years, 5 months ago (2017-07-10 01:17:37 UTC) #52
dominickn
webapps lgtm
3 years, 5 months ago (2017-07-10 01:19:44 UTC) #53
Ted C
https://codereview.chromium.org/2969143002/diff/160001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java (right): https://codereview.chromium.org/2969143002/diff/160001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java#newcode66 chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java:66: return mMostRecentActivity != null why not just use ApplicationStatus.getLastTrackedFocusedActivity() ...
3 years, 5 months ago (2017-07-10 18:10:15 UTC) #54
piotrs
Thank you Ted! https://codereview.chromium.org/2969143002/diff/160001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java (right): https://codereview.chromium.org/2969143002/diff/160001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java#newcode66 chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java:66: return mMostRecentActivity != null An Oversight. ...
3 years, 5 months ago (2017-07-10 23:40:54 UTC) #57
Ted C
lgtm https://codereview.chromium.org/2969143002/diff/180001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java (right): https://codereview.chromium.org/2969143002/diff/180001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java#newcode290 chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java:290: return ApplicationStatus.getStateForApplication() == HAS_PAUSED_ACTIVITIES Ahh...I was going to ...
3 years, 5 months ago (2017-07-11 00:03:05 UTC) #58
Ted C
https://codereview.chromium.org/2969143002/diff/160001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java (right): https://codereview.chromium.org/2969143002/diff/160001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java#newcode78 chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java:78: && (System.currentTimeMillis() - mTimeWhenSetToNullMillis) On 2017/07/10 23:40:54, piotrs wrote: ...
3 years, 5 months ago (2017-07-11 00:05:39 UTC) #59
piotrs
Merge
3 years, 5 months ago (2017-07-11 23:01:26 UTC) #74
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/2969143002/280001
3 years, 5 months ago (2017-07-12 03:19:37 UTC) #81
commit-bot: I haz the power
Committed patchset #9 (id:280001) as https://chromium.googlesource.com/chromium/src/+/727468b41b2fe48bf73983ab0c3aa2632b47d89e
3 years, 5 months ago (2017-07-12 04:07:05 UTC) #85
aberent
A revert of this CL (patchset #9 id:280001) has been created in https://codereview.chromium.org/2975883003/ by aberent@chromium.org. ...
3 years, 5 months ago (2017-07-12 10:03:10 UTC) #86
piotrs
I cannot reproduce the waterfall test failure on a local Marshmallow N5X. In a new ...
3 years, 5 months ago (2017-07-13 00:40:40 UTC) #89
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/2969143002/300001
3 years, 5 months ago (2017-07-13 00:41:25 UTC) #92
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/219373)
3 years, 5 months ago (2017-07-13 03:18:02 UTC) #94
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/2969143002/300001
3 years, 5 months ago (2017-07-13 04:18:19 UTC) #96
commit-bot: I haz the power
Committed patchset #10 (id:300001) as https://chromium.googlesource.com/chromium/src/+/4dbcecfb630ac1a2dba1910f0e429b82bf3a0b5f
3 years, 5 months ago (2017-07-13 05:16:50 UTC) #99
aberent
A revert of this CL (patchset #10 id:300001) has been created in https://codereview.chromium.org/2977023002/ by aberent@chromium.org. ...
3 years, 5 months ago (2017-07-13 10:17:42 UTC) #100
piotrs
FYI pulled out a fixed needed to get this in into crrev.com/c/575111/.
3 years, 5 months ago (2017-07-18 05:28:41 UTC) #109
piotrs
Sends intents to specialized apps in WebappTabDelegate
3 years, 5 months ago (2017-07-19 00:34:20 UTC) #110
piotrs
For the record, newest patch adding lookup for specialized URL handler to WebappTabDelegate is in ...
3 years, 5 months ago (2017-07-19 00:39:20 UTC) #113
Yusuf
https://codereview.chromium.org/2969143002/diff/360001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java (right): https://codereview.chromium.org/2969143002/diff/360001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java#newcode71 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java:71: mActivity.startActivity(intent); I think dependence on ExternalNavigationDelegate here is hurting ...
3 years, 5 months ago (2017-07-19 03:33:37 UTC) #116
piotrs
No longer instantiates ExternalNavigationDelegateImpl, uses static calls instead
3 years, 5 months ago (2017-07-19 04:04:48 UTC) #117
piotrs
No longer instantiates ExternalNavigationDelegateImpl, uses static calls instead
3 years, 5 months ago (2017-07-19 04:05:45 UTC) #120
piotrs
Worked out pretty well, PTAL. https://codereview.chromium.org/2969143002/diff/360001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java (right): https://codereview.chromium.org/2969143002/diff/360001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java#newcode71 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java:71: mActivity.startActivity(intent); I found isPackageSpecializedHandler, ...
3 years, 5 months ago (2017-07-19 04:06:25 UTC) #124
Yusuf
lgtm
3 years, 5 months ago (2017-07-19 05:08:41 UTC) #125
piotrs
Merge
3 years, 5 months ago (2017-07-19 05:36:30 UTC) #126
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/2969143002/420001
3 years, 5 months ago (2017-07-19 07:28:43 UTC) #133
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/341833)
3 years, 5 months ago (2017-07-19 09:49:55 UTC) #135
piotrs
Fix for Marshmallow
3 years, 5 months ago (2017-07-19 23:10:53 UTC) #136
piotrs
Merge
3 years, 5 months ago (2017-07-19 23:12:11 UTC) #137
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/2969143002/460001
3 years, 5 months ago (2017-07-19 23:13:04 UTC) #140
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/383657)
3 years, 5 months ago (2017-07-19 23:26:05 UTC) #142
piotrs
Merge
3 years, 5 months ago (2017-07-19 23:59:09 UTC) #143
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/2969143002/480001
3 years, 5 months ago (2017-07-20 00:01:17 UTC) #147
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/342747)
3 years, 5 months ago (2017-07-20 02:21:33 UTC) #149
piotrs
Strict mode disk read violation workaround for PackageManager#queryIntentActivities()
3 years, 5 months ago (2017-07-20 03:11:55 UTC) #150
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/2969143002/500001
3 years, 5 months ago (2017-07-20 03:12:55 UTC) #153
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/342856)
3 years, 5 months ago (2017-07-20 05:19:36 UTC) #155
piotrs
Start activity for WebappActivity reference
3 years, 5 months ago (2017-07-20 05:34:30 UTC) #156
piotrs
Merge
3 years, 5 months ago (2017-07-20 05:37:06 UTC) #157
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/2969143002/540001
3 years, 5 months ago (2017-07-20 05:37:40 UTC) #160
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/342940)
3 years, 5 months ago (2017-07-20 07:44:32 UTC) #162
piotrs
Merge
3 years, 5 months ago (2017-07-20 10:51:36 UTC) #163
piotrs
Loosen strict mode, as it is stil violated
3 years, 5 months ago (2017-07-20 10:58:53 UTC) #164
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/2969143002/580001
3 years, 5 months ago (2017-07-20 10:59:55 UTC) #167
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/225232)
3 years, 5 months ago (2017-07-20 11:39:25 UTC) #169
piotrs
Fix
3 years, 5 months ago (2017-07-20 12:23:37 UTC) #170
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/2969143002/600001
3 years, 5 months ago (2017-07-20 12:24:28 UTC) #174
commit-bot: I haz the power
3 years, 5 months ago (2017-07-20 13:41:47 UTC) #177
Message was sent while issue was closed.
Committed patchset #20 (id:600001) as
https://chromium.googlesource.com/chromium/src/+/471df3926c09fda0af15d9157eb2...

Powered by Google App Engine
This is Rietveld 408576698