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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java

Issue 2537293002: Instant Apps: Allow custom tab redirects to Instant Apps. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java
index 7ec63dc7d1e1c3577a1ca0f1d4de4ddc49fc5df6..40632f777be79dd91b1b718eb92f52d906fada94 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java
@@ -199,7 +199,15 @@ public class TabRedirectHandler {
*/
public boolean shouldStayInChrome(boolean hasExternalProtocol) {
return (mIsInitialIntentHeadingToChrome && !hasExternalProtocol)
- || mInitialNavigationType == NAVIGATION_TYPE_FROM_LINK_WITHOUT_USER_GESTURE
+ || shouldNavigationTypeStayInChrome();
+
+ }
+
+ /**
+ * @return Whether the current navigation is of the type that should always stay in Chrome.
+ */
+ public boolean shouldNavigationTypeStayInChrome() {
+ return mInitialNavigationType == NAVIGATION_TYPE_FROM_LINK_WITHOUT_USER_GESTURE
|| mInitialNavigationType == NAVIGATION_TYPE_FROM_RELOAD;
}

Powered by Google App Engine
This is Rietveld 408576698