summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebViewClient.java
diff options
context:
space:
mode:
authorNate Fischer <ntfschr@google.com>2017-03-06 17:11:40 -0800
committerNate Fischer <ntfschr@google.com>2017-03-06 18:25:07 -0800
commit3c7c9370606b20069d80a96c89db2fb98d137469 (patch)
treefc786346f879b809885572c733c7598b17d16039 /core/java/android/webkit/WebViewClient.java
parent9f2888d9cc65bbbd20e3aa2c30f8baa90a41a6f4 (diff)
Add WebView Safe Browsing error code
This adds a Safe Browsing specific network error code for WebView. This will be returned when we cancel page load because the end user has clicked "Back to safety" on an interstitial page, the WebView is too small to display a readable interstitial page, or other similar cases. When this is used due to an unsafe subresource, the error passed to WebViewClient#OnReceivedError() will be associated with that specific resource, not the main frame. Bug: 36007752 Test: N/A Change-Id: I8b149a9d6e4ed113de0dd8ee051a2934af477128
Diffstat (limited to 'core/java/android/webkit/WebViewClient.java')
-rw-r--r--core/java/android/webkit/WebViewClient.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebViewClient.java b/core/java/android/webkit/WebViewClient.java
index 0a73e17dd6e4..788908ad9468 100644
--- a/core/java/android/webkit/WebViewClient.java
+++ b/core/java/android/webkit/WebViewClient.java
@@ -234,6 +234,8 @@ public class WebViewClient {
public static final int ERROR_FILE_NOT_FOUND = -14;
/** Too many requests during this load */
public static final int ERROR_TOO_MANY_REQUESTS = -15;
+ /** Resource load was cancelled by Safe Browsing */
+ public static final int ERROR_UNSAFE_RESOURCE = -16;
/**
* Report an error to the host application. These errors are unrecoverable