Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
haanhvu committed Jan 7, 2025
1 parent 525519a commit eed0617
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.igalia.wolvic.browser.api.impl;

import android.util.Log;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

Expand Down Expand Up @@ -110,8 +108,6 @@ public void didStopLoading(GURL url, boolean isKnownValid) {

@Override
public void didFailLoad(boolean isInPrimaryMainFrame, int errorCode, GURL failingUrl, @LifecycleState int rfhLifecycleState) {
Log.e("ChromiumErrorPage", "Chromium error code: " + errorCode);

@Nullable WSession.ProgressDelegate delegate = mSession.getProgressDelegate();
if (delegate != null && isInPrimaryMainFrame) {
delegate.onPageStop(mSession, false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.igalia.wolvic.browser.api.impl;

import android.util.Log;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

Expand Down Expand Up @@ -68,8 +66,6 @@ public GeckoResult<GeckoSession> onNewSession(@NonNull GeckoSession session, @No
@Nullable
@Override
public GeckoResult<String> onLoadError(@NonNull GeckoSession session, @Nullable String uri, @NonNull WebRequestError error) {
Log.e("ChromiumErrorPage", "Gecko error code: " + error);

return ResultImpl.from(mDelegate.onLoadError(mSession, uri, new WWebRequestError() {
@Override
public int code() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import mozilla.components.browser.errorpages.ErrorType;

//import org.chromium.net.NetError;
import org.chromium.net.NetError;

public class InternalPages {

Expand All @@ -23,7 +23,7 @@ private static ErrorType fromSessionErrorToErrorType(int error) {
case WWebRequestError.ERROR_SECURITY_SSL: {
return ErrorType.ERROR_SECURITY_SSL;
}
case -201:
case NetError.ERR_CERT_DATE_INVALID:
case WWebRequestError.ERROR_SECURITY_BAD_CERT: {
return ErrorType.ERROR_SECURITY_BAD_CERT;
}
Expand Down Expand Up @@ -132,7 +132,7 @@ public static byte[] createErrorPageData(Context context,

boolean showSSLAdvanced;
switch (sessionError) {
case -201:
case NetError.ERR_CERT_DATE_INVALID:
case WWebRequestError.ERROR_SECURITY_SSL:
case WWebRequestError.ERROR_SECURITY_BAD_CERT:
showSSLAdvanced = true;
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/raw/error_pages.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

advancedVisible = !advancedVisible;
}
function acceptAndContinue() {
function acceptAndContinue(temporary) {
window.certificateErrorPageController.proceed();
}
</script>
Expand Down Expand Up @@ -64,7 +64,7 @@ <h1 id="et_dnsNotFound" class="errorTitleText">%messageShort%</h1>
<button id="advancedPanelReturnButton" onClick="window.history.back()" class="button">Go Back (Recommended)</button>
</div>
<div id="advancedPanelButtonContainer" class="button-container">
<button id="button" class="buttonSecondary" onClick="acceptAndContinue()">Accept the Risk and Continue</button>
<button id="button" class="buttonSecondary" onClick="acceptAndContinue(true)">Accept the Risk and Continue</button>
</div>
</div>
</div>
Expand Down

0 comments on commit eed0617

Please sign in to comment.