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

Issue 2968623002: [WebApk] Fix broken launch when matching an app with verified intent filters. (Closed)

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

Description

[WebApk] Fix broken launch when matching an app with verified intent filters. The issue was that WebappLauncherActivity queries package manager to see if "a valid webapk can handle this url" and that "the webapk's package matches the webapk package I'm going to load". The problem is when a WebApk's intent scope collides with a native app that has a verified intent filter, the first part of the query only returns the native app's package. This is fixed by forcing intent resolution with the WebApk package name of the WebApk for which we're trying to render a page and then still checking that the WebApk is valid. Note: we still fully respect verified intent filters and does nothing to change intent dispatch when clicking on a link that could match a native app with verified intent filters. This simply means that if the WebApk is launched it'll work and changing intent dispatch is a separate product question. BUG=738262 Review-Url: https://codereview.chromium.org/2968623002 Cr-Commit-Position: refs/heads/master@{#483744} Committed: https://chromium.googlesource.com/chromium/src/+/9f381948a4babe74c82462b7d41f79c370bf09ac

Patch Set 1 #

Total comments: 20

Patch Set 2 : [WebApk] Fix broken launch when matching an app with verified intent filters. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -44 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java View 1 2 chunks +104 lines, -25 lines 0 comments Download
M chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkValidator.java View 1 6 chunks +38 lines, -18 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 19 (11 generated)
Yaron
https://codereview.chromium.org/2968623002/diff/1/chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java File chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java (right): https://codereview.chromium.org/2968623002/diff/1/chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java#newcode187 chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java:187: * Tests {@link WebApkValidator.webApkCanHandleUrl()} returns null for a non-browsable ...
3 years, 5 months ago (2017-06-30 00:59:55 UTC) #4
Yaron
https://codereview.chromium.org/2968623002/diff/1/chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkValidator.java File chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkValidator.java (right): https://codereview.chromium.org/2968623002/diff/1/chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkValidator.java#newcode102 chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkValidator.java:102: System.out.println("failed to verify"); will remove :/
3 years, 5 months ago (2017-06-30 01:00:55 UTC) #5
Yaron
3 years, 5 months ago (2017-06-30 01:01:03 UTC) #7
dominickn
lgtm % your nits :)
3 years, 5 months ago (2017-06-30 02:45:46 UTC) #11
pkotwicz
LGTM with nits https://codereview.chromium.org/2968623002/diff/1/chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java File chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java (right): https://codereview.chromium.org/2968623002/diff/1/chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java#newcode167 chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java:167: */ s/if it matches a WebAPK ...
3 years, 5 months ago (2017-06-30 15:59:13 UTC) #12
Yaron
thanks https://codereview.chromium.org/2968623002/diff/1/chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java File chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java (right): https://codereview.chromium.org/2968623002/diff/1/chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java#newcode167 chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java:167: */ On 2017/06/30 15:59:12, pkotwicz wrote: > s/if ...
3 years, 5 months ago (2017-06-30 16:52:35 UTC) #13
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/2968623002/20001
3 years, 5 months ago (2017-06-30 16:52:58 UTC) #16
commit-bot: I haz the power
3 years, 5 months ago (2017-06-30 17:44:59 UTC) #19
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/9f381948a4babe74c82462b7d41f...

Powered by Google App Engine
This is Rietveld 408576698