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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImpl.java

Issue 2885983002: Fixes intent chooser being shown incorrectly when going from HTTPS to HTTP for (Closed)
Patch Set: . Created 3 years, 7 months 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/externalnav/ExternalNavigationDelegateImpl.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImpl.java
index 9610a5e9793400a8b25155ec931f389b21b35cbe..63d63b005785d3209e4f5bdca601d5e90e7dc8e2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImpl.java
@@ -557,6 +557,8 @@ public class ExternalNavigationDelegateImpl implements ExternalNavigationDelegat
@Override
public boolean isSerpReferrer(Tab tab) {
+ // TODO (thildebr): Investigate whether or not we can use getLastCommittedUrl() instead of
+ // the NavigationController.
if (tab == null || tab.getWebContents() == null) return false;
NavigationController nController = tab.getWebContents().getNavigationController();
@@ -596,6 +598,12 @@ public class ExternalNavigationDelegateImpl implements ExternalNavigationDelegat
return false;
}
+ @Override
+ public String getPreviousUrl() {
+ if (mTab == null || mTab.getWebContents() == null) return null;
+ return mTab.getWebContents().getLastCommittedUrl();
+ }
+
/**
* Dispatches the intent through a proxy activity, so that startActivityForResult can be used
* and the intent recipient can verify the caller.

Powered by Google App Engine
This is Rietveld 408576698