Use fallback URL more extensively
commit9a23240a46096e9042b1499dad67ab1f947c9d17
authorchangwan <changwan@chromium.org>
Wed, 1 Apr 2015 01:19:48 +0000 (31 18:19 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 1 Apr 2015 01:20:58 +0000 (1 01:20 +0000)
tree81e4fcd0a240a919afc422b730d02e6f6293ddec
parent4bf46ca929d17910fcf66cc25e886b986845ca59
Use fallback URL more extensively

Currently, if you type a URL in the omnibox, and if the URL gets redirected
to a 'intent://' URL, then it does not launch a native app and it just gets
ignored.

I believe that this is for security / UI reasons (see crbug.com/331571),
but it is somewhat weird that your URL (e.g. http://goo.gl/ABCDE) gets
completely ignored, especially when you aren't sure whether goo.gl will be
redirected to a normal URL or to an intent URL.

This behavior can be improved for the case when fallback URL is used,
as we can load the fallback URL instead of ignoring the URL.

Also there are other cases fallback URL can be useful, such as when
Context#startActivityIfNeeded() returns false.

BUG=470722

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

Cr-Commit-Position: refs/heads/master@{#323162}
chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java
chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
chrome/android/javatests/src/org/chromium/chrome/browser/tab/TabRedirectHandlerTest.java