New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 654941 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit 20 days ago
Closed: Nov 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Chrome Ignores Android Intent Filters

Reported by mmur...@commonsware.com, Oct 11 2016

Issue description

Version: 55.0.2878.0 dev (64-bit)
Platform: 8861.0.0 (Official Build) dev-channel cyan
Device: Acer Chromebook C11 R738T

Steps to reproduce:
(1) Compile, install, and run the attached URLHandler sample app
(2) Click the "Visit Sample Page" button to bring up https://commonsware.com/sample in Chrome
(3) Click the Sample PDF link
(4) Click the back button to return to https://commonsware.com/sample
(5) Click the "Link to www.this-so-does-not-exist.com" link

Expected result:

The result of step (3) should be some sort of chooser, allowing the user to choose between viewing the PDF in Chrome or viewing it in the URLHandler sample app, as it advertises that it supports ACTION_VIEW for application/pdf files.

The result of step (5) should be some sort of chooser, allowing the user to choose between viewing the PDF in Chrome or viewing it in the URLHandler sample app, as it advertises that it supports ACTION_VIEW for http://www.this-so-does-not-exist.com/something, which is where we linked to 

Actual result:

Step (3) brings up the PDF in Chrome. Step (5) brings up an ERR_NAME_NOT_RESOLVED error page in Chrome.

 
URLHandler.zip
11.3 KB Download
Owner: yusukes@chromium.org
Status: Assigned (was: Untriaged)
re: (3), MIME type handling is not implemented yet, but should be in a future update

re: (5), domain level intent filtering should work.  Yusuke, any ideas?
Status: Started (was: Assigned)
Re: 3), although Chrome does not support intent filters with android:mimeType yet, Files app (Chrome OS' default filer app) does. For now, you can work around the issue by downloading the pdf, then right-clicking the pdf file in Files app. If you right-click the file in the app (and then clicks "more actions"), you'll see your app's name in the context menu. Just FYI.

I'm taking a look at 5).

Comment 3 by uekawa@google.com, Oct 12 2016

Cc: uekawa@chromium.org hashimoto@chromium.org nya@chromium.org
comment #3: this is about Chrome-to-ARC intent handling, not the other way around which hashimoto@ is working on.

Comment 5 by uekawa@google.com, Oct 12 2016

re#4, (I was almost going to add that (3) is being addressed but I stopped realizing this was something else, oh well)
Cc: yusukes@chromium.org
Owner: ----
Status: Available (was: Started)
Re 5), this is WAI at this point. Chrome does not show the chooser for https-to-http navigations. I've filed an internal bug (Elijah: b/32124395) to see if there's a way to improve it.

Let me keep this bug open for now.
Owner: djacobo@google.com
Status: Started (was: Available)
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/21236422b54f032ac6a7dcd42d4c8768129f82ae

commit 21236422b54f032ac6a7dcd42d4c8768129f82ae
Author: djacobo <djacobo@google.com>
Date: Thu Oct 20 21:49:12 2016

Capture http to https navigations w/ intent picker

For navigations from http to https we cannot rely on the Referrer's url
since it is cleaned due to the sanitization proccess. For this case we
will make use of GetLastCommittedURL(), the main purpose of this
information is to decide whether or not to register
ArcNavigationThrottle as a candidate to handle a given navigation.

BUG= 654941 
TEST=look at the bug description for repro.

Review-Url: https://chromiumcodereview.appspot.com/2436923002
Cr-Commit-Position: refs/heads/master@{#426610}

[modify] https://crrev.com/21236422b54f032ac6a7dcd42d4c8768129f82ae/chrome/browser/chromeos/arc/arc_navigation_throttle.cc

Comment 9 by djacobo@google.com, Oct 21 2016

Labels: Merge-Request-55
Cc: bhthompson@chromium.org
+bhthompson@

Labels: -Merge-Request-55 Merge-Approved-52
Project Member

Comment 12 by bugdroid1@chromium.org, Oct 21 2016

Labels: merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/10e9dc3198f60a958c62d67062724ca81d9228d3

commit 10e9dc3198f60a958c62d67062724ca81d9228d3
Author: Yusuke Sato <yusukes@google.com>
Date: Fri Oct 21 23:05:00 2016

Capture http to https navigations w/ intent picker

For navigations from http to https we cannot rely on the Referrer's url
since it is cleaned due to the sanitization proccess. For this case we
will make use of GetLastCommittedURL(), the main purpose of this
information is to decide whether or not to register
ArcNavigationThrottle as a candidate to handle a given navigation.

BUG= 654941 
TEST=look at the bug description for repro.

Review-Url: https://chromiumcodereview.appspot.com/2436923002
Cr-Commit-Position: refs/heads/master@{#426610}
(cherry picked from commit 21236422b54f032ac6a7dcd42d4c8768129f82ae)

Review URL: https://codereview.chromium.org/2445493002 .

Cr-Commit-Position: refs/branch-heads/2883@{#233}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/10e9dc3198f60a958c62d67062724ca81d9228d3/chrome/browser/chromeos/arc/arc_navigation_throttle.cc

Project Member

Comment 13 by sheriffbot@chromium.org, Oct 25 2016

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Approved-52
let's not merge this to 52 :)
Labels: Merge-Request-55
My bad, the autocomplete goes to 52 by default :)

Comment 16 by dimu@chromium.org, Oct 27 2016

Labels: -Merge-Request-55 Merge-Approved-55 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M55 (branch: 2883)
Project Member

Comment 17 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/10e9dc3198f60a958c62d67062724ca81d9228d3

commit 10e9dc3198f60a958c62d67062724ca81d9228d3
Author: Yusuke Sato <yusukes@google.com>
Date: Fri Oct 21 23:05:00 2016

Capture http to https navigations w/ intent picker

For navigations from http to https we cannot rely on the Referrer's url
since it is cleaned due to the sanitization proccess. For this case we
will make use of GetLastCommittedURL(), the main purpose of this
information is to decide whether or not to register
ArcNavigationThrottle as a candidate to handle a given navigation.

BUG= 654941 
TEST=look at the bug description for repro.

Review-Url: https://chromiumcodereview.appspot.com/2436923002
Cr-Commit-Position: refs/heads/master@{#426610}
(cherry picked from commit 21236422b54f032ac6a7dcd42d4c8768129f82ae)

Review URL: https://codereview.chromium.org/2445493002 .

Cr-Commit-Position: refs/branch-heads/2883@{#233}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/10e9dc3198f60a958c62d67062724ca81d9228d3/chrome/browser/chromeos/arc/arc_navigation_throttle.cc

Project Member

Comment 18 by sheriffbot@chromium.org, Oct 31 2016

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 19 by bugdroid1@chromium.org, Nov 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/04a713e72e35274ba7e3f219dbc60c670208b120

commit 04a713e72e35274ba7e3f219dbc60c670208b120
Author: djacobo <djacobo@google.com>
Date: Mon Oct 31 23:58:26 2016

Modifies how Arc's throttle handles redirections

Since we want to handle navigations going from https to http we need to
enforce having a Referrer(), we call it |starting_gurl_|. This will
allow us to know where the navigation started and fire up the intent
picker.

This also modifies the way we treat redirections within the same
navigation throttle object. Since we now enforce having a starting GURL
we are not discarding as many throttles via ShouldOverrideUrlLoading(),
which previously discarded a throttle just because it didn't contain a
referrer.

BUG= 654941 
TEST=Check the repro info on the bug, also manually tested with
youtube links.

Review-Url: https://codereview.chromium.org/2458073003
Cr-Commit-Position: refs/heads/master@{#428873}

[modify] https://crrev.com/04a713e72e35274ba7e3f219dbc60c670208b120/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc
[modify] https://crrev.com/04a713e72e35274ba7e3f219dbc60c670208b120/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h
[modify] https://crrev.com/04a713e72e35274ba7e3f219dbc60c670208b120/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle_unittest.cc

Labels: Merge-Request-55

Comment 21 by dimu@chromium.org, Nov 2 2016

Labels: -Merge-Request-55
Your change meets the bar and is auto-approved for M55 (branch: 2883)
Project Member

Comment 22 by bugdroid1@chromium.org, Nov 3 2016

Labels: -merge-approved-55
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/827d3e0f0234f4fdec8dfc47cdf4fbc6a3b3346d

commit 827d3e0f0234f4fdec8dfc47cdf4fbc6a3b3346d
Author: Yusuke Sato <yusukes@google.com>
Date: Thu Nov 03 20:42:24 2016

Modifies how Arc's throttle handles redirections

Since we want to handle navigations going from https to http we need to
enforce having a Referrer(), we call it |starting_gurl_|. This will
allow us to know where the navigation started and fire up the intent
picker.

This also modifies the way we treat redirections within the same
navigation throttle object. Since we now enforce having a starting GURL
we are not discarding as many throttles via ShouldOverrideUrlLoading(),
which previously discarded a throttle just because it didn't contain a
referrer.

BUG= 654941 
TEST=Check the repro info on the bug, also manually tested with
youtube link

R=yusukes@chromium.org

Review URL: https://codereview.chromium.org/2471783005 .

Cr-Commit-Position: refs/branch-heads/2883@{#444}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/827d3e0f0234f4fdec8dfc47cdf4fbc6a3b3346d/chrome/browser/chromeos/arc/arc_navigation_throttle.cc
[modify] https://crrev.com/827d3e0f0234f4fdec8dfc47cdf4fbc6a3b3346d/chrome/browser/chromeos/arc/arc_navigation_throttle.h
[modify] https://crrev.com/827d3e0f0234f4fdec8dfc47cdf4fbc6a3b3346d/chrome/browser/chromeos/arc/arc_navigation_throttle_unittest.cc

Comment 23 by dimu@google.com, Nov 4 2016

[Automated comment] removing mislabelled merge-merged-2840

Comment 24 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840

Comment 25 by djacobo@google.com, Nov 15 2016

Status: Fixed (was: Started)

Comment 26 by dchan@google.com, Jan 21 2017

Labels: VerifyIn-57

Comment 27 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58
Status: Verified (was: Fixed)

Sign in to add a comment