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

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

Issue 992593003: [Android WebView] Lay the groundwork for a better onReceivedError (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 5 years, 9 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: android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java b/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java
index 0744eb42ecd1f798fbda3b38f59979979792d1ee..ac4ba3ae2536697665338b2eb50b6fee690fd8be 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java
@@ -59,14 +59,13 @@ public class AwContentsClientCallbackHelper {
}
private static class OnReceivedErrorInfo {
- final int mErrorCode;
- final String mDescription;
- final String mFailingUrl;
-
- OnReceivedErrorInfo(int errorCode, String description, String failingUrl) {
- mErrorCode = errorCode;
- mDescription = description;
- mFailingUrl = failingUrl;
+ final AwContentsClient.AwWebResourceRequest mRequest;
+ final AwContentsClient.AwWebResourceError mError;
+
+ OnReceivedErrorInfo(AwContentsClient.AwWebResourceRequest request,
+ AwContentsClient.AwWebResourceError error) {
+ mRequest = request;
+ mError = error;
}
}
@@ -120,8 +119,7 @@ public class AwContentsClientCallbackHelper {
}
case MSG_ON_RECEIVED_ERROR: {
OnReceivedErrorInfo info = (OnReceivedErrorInfo) msg.obj;
- mContentsClient.onReceivedError(info.mErrorCode, info.mDescription,
- info.mFailingUrl);
+ mContentsClient.onReceivedError(info.mRequest, info.mError);
break;
}
case MSG_ON_NEW_PICTURE: {
@@ -174,8 +172,9 @@ public class AwContentsClientCallbackHelper {
mHandler.sendMessage(mHandler.obtainMessage(MSG_ON_RECEIVED_LOGIN_REQUEST, info));
}
- public void postOnReceivedError(int errorCode, String description, String failingUrl) {
- OnReceivedErrorInfo info = new OnReceivedErrorInfo(errorCode, description, failingUrl);
+ public void postOnReceivedError(AwContentsClient.AwWebResourceRequest request,
+ AwContentsClient.AwWebResourceError error) {
+ OnReceivedErrorInfo info = new OnReceivedErrorInfo(request, error);
mHandler.sendMessage(mHandler.obtainMessage(MSG_ON_RECEIVED_ERROR, info));
}

Powered by Google App Engine
This is Rietveld 408576698