From 09720caa5e650583d29f4a860771d7a4e0ecb984 Mon Sep 17 00:00:00 2001 From: campersau Date: Sat, 31 Jan 2026 10:04:49 +0100 Subject: [PATCH] Core - Update CefErrorCode and PermissionRequestType --- CefSharp/Enums/CefErrorCode.cs | 116 ++++++++++++++---------- CefSharp/Enums/PermissionRequestType.cs | 2 + 2 files changed, 70 insertions(+), 48 deletions(-) diff --git a/CefSharp/Enums/CefErrorCode.cs b/CefSharp/Enums/CefErrorCode.cs index e5001e42f..d8140d0d5 100644 --- a/CefSharp/Enums/CefErrorCode.cs +++ b/CefSharp/Enums/CefErrorCode.cs @@ -205,6 +205,12 @@ public enum CefErrorCode /// BlockedByFingerprintingProtection = -34, + /// + /// The request was blocked by the Incognito Mode URL block list configured by + /// the domain administrator. + /// + BlockedInIncognitoByAdministrator = -35, + /// /// A connection was closed (corresponding to a TCP FIN). /// @@ -269,10 +275,8 @@ public enum CefErrorCode /// TunnelConnectionFailed = -111, - /// - /// No SSL protocol versions are enabled. - /// - NoSslVersionsEnabled = -112, + // Obsolete: + // NET_ERROR(NO_SSL_VERSIONS_ENABLED, -112) /// /// The client and server don't support a common SSL protocol version or @@ -410,15 +414,9 @@ public enum CefErrorCode /// TemporarilyThrottled = -139, - /// - /// A request to create an SSL tunnel connection through the HTTPS proxy - /// received a 302 (temporary redirect) response. The response body might - /// include a description of why the request failed. - /// - /// TODO(crbug.com/40093955): This is deprecated and should not be used by - /// new code. - /// - HttpsProxyTunnelResponseRedirect = -140, + // Obsolete, since we now use the catch-all ERR_TUNNEL_CONNECTION_FAILED when a + // proxy tried to redirect a request. + // NET_ERROR(HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT, -140) /// /// We were unable to sign the CertificateVerify data of an SSL client auth @@ -454,15 +452,9 @@ public enum CefErrorCode /// AddressInUse = -147, - /// - /// An operation failed because the SSL handshake has not completed. - /// - SslHandshakeNotCompleted = -148, - - /// - /// SSL peer's public key is invalid. - /// - SslBadPeerPublicKey = -149, + // Obsolete: + // NET_ERROR(SSL_HANDSHAKE_NOT_COMPLETED, -148) + // NET_ERROR(SSL_BAD_PEER_PUBLIC_KEY, -149) /// /// The certificate didn't match the built-in public key pins for the host name. @@ -954,22 +946,14 @@ public enum CefErrorCode /// NetworkIoSuspended = -331, - /// - /// FLIP data received without receiving a SYN_REPLY on the stream. - /// - SynReplyNotReceived = -332, - - /// - /// Converting the response to target encoding failed. - /// - EncodingConversionFailed = -333, + // Obsolete. This was in earlier SPDY implementations. + // NET_ERROR(SYN_REPLY_NOT_RECEIVED, -332) - /// - /// The server sent an FTP directory listing in a format we do not understand. - /// - UnrecognizedFtpDirectoryListingFormat = -334, + // Obsolete. These were both used for FTP, which is no longer supported. + // NET_ERROR(ENCODING_CONVERSION_FAILED, -333) + // NET_ERROR(UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT, -334) - // Obsolete. Was only logged in NetLog when an HTTP/2 pushed stream expired. + // Obsolete. Was only logged in NetLog when an HTTP/2 pushed stream expired. // NET_ERROR(INVALID_SPDY_STREAM, -335) /// @@ -1377,6 +1361,20 @@ public enum CefErrorCode /// TrustTokenOperationSuccessWithoutSendingRequest = -507, + /// + /// This is a placeholder value that should never be used within //net. + /// + /// When Cronet APIs are being backed by HttpEngine (i.e., HttpEngineProvider is + /// being used), org.chromium.net.NetworkException#getCronetInternalErrorCode is + /// not supported (android.net.http.NetworkException#getCronetInternalErrorCode + /// does not exist). In this scenario, getCronetInternalErrorCode will always + /// return this error. This is a first step towards the deprecation of + /// getCronetInternalErrorCode. + /// + /// Temporarily terminate, then restart, ITTT to avoid unsupported nesting. + /// + HttpengineProviderInUse = -508, + // *** Code -600 is reserved (was FTP_PASV_COMMAND_FAILED). *** // *** Code -601 is reserved (was FTP_FAILED). *** // *** Code -602 is reserved (was FTP_SERVICE_UNAVAILABLE). *** @@ -1474,18 +1472,7 @@ public enum CefErrorCode /// DnsServerRequiresTcp = -801, - /// - /// DNS server failed. This error is returned for all of the following - /// error conditions: - /// 1 - Format error - The name server was unable to interpret the query. - /// 2 - Server failure - The name server was unable to process this query - /// due to a problem with the name server. - /// 4 - Not Implemented - The name server does not support the requested - /// kind of query. - /// 5 - Refused - The name server refuses to perform the specified - /// operation for policy reasons. - /// - DnsServerFailed = -802, + // Error -802 was removed (DNS_SERVER_FAILED) /// /// DNS transaction timed out. @@ -1550,6 +1537,39 @@ public enum CefErrorCode /// DnsCacheInvalidationInProgress = -815, + /// + /// The DNS server responded with a format error response code. + /// + DnsFormatError = -816, + + /// + /// The DNS server responded with a server failure response code. + /// + DnsServerFailure = -817, + + /// + /// The DNS server responded that the query type is not implemented. + /// + DnsNotImplemented = -818, + + /// + /// The DNS server responded that the request was refused. + /// + DnsRefused = -819, + + /// + /// The DNS server responded with an rcode indicating that the request failed, + /// but the rcode is not one that we have a specific error code for. In other + /// words, the rcode was not one of the following: + /// - NOERR + /// - FORMERR + /// - SERVFAIL + /// - NXDOMAIN + /// - NOTIMP + /// - REFUSED + /// + DnsOtherFailure = -820, + // The following errors are for mapped from a subset of invalid // storage::BlobStatus. diff --git a/CefSharp/Enums/PermissionRequestType.cs b/CefSharp/Enums/PermissionRequestType.cs index a92e5dd34..a1cc8f32c 100644 --- a/CefSharp/Enums/PermissionRequestType.cs +++ b/CefSharp/Enums/PermissionRequestType.cs @@ -41,5 +41,7 @@ public enum PermissionRequestType : uint WindowManagement = 1 << 23, FileSystemAccess = 1 << 24, LocalNetworkAccess = 1 << 25, + LocalNetwork = 1 << 26, + LoopbackNetwork = 1 << 27, } }