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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContentsClient.java

Issue 2780403002: WebView: change default shouldOverrideUrlLoading (Closed)
Patch Set: Squash commits Created 3 years, 8 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
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwContentsClient.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java
index 14c8116348af6a2dfbedb483cc704dcaf9accba1..972f53d3e5b7351a703a2886690f4eaa83ce1581 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java
@@ -27,6 +27,7 @@ import android.webkit.WebChromeClient;
import org.chromium.android_webview.permission.AwPermissionRequest;
import org.chromium.base.Log;
import org.chromium.base.annotations.SuppressFBWarnings;
+import org.chromium.content_public.common.ContentUrlConstants;
import java.security.Principal;
import java.util.HashMap;
@@ -177,6 +178,12 @@ public abstract class AwContentsClient {
Log.w(TAG, "Denied starting an intent without a user gesture, URI %s", url);
return true;
}
+
+ // Treat 'about:' URLs as internal, always open them in the WebView
+ if (url.startsWith(ContentUrlConstants.ABOUT_URL_SHORT_PREFIX)) {
+ return false;
+ }
+
Intent intent;
// Perform generic parsing of the URI to turn it into an Intent.
try {
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698