Skip to content

Conversation

@campersau
Copy link
Contributor

@campersau campersau commented Jan 31, 2026

PermissinRequestType got updated again in 145.0.7632.0

Summary:
Updated CefErrorCode using https://raw.githubusercontent.com/chromium/chromium/145.0.7632.0/net/base/net_error_list.h and steps described in #3785
Updated PermissionRequestType using https://github.com/chromiumembedded/cef/blob/bfb74aa1a42355203a43fa89f38e7737e954f67f/include/internal/cef_types.h#L3822-L3856

Changes:

  • some existing enums were renamed which is a breaking change but consistent with the source

How Has This Been Tested?
Build works.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Updated documentation

Checklist:

  • Tested the code(if applicable)
  • Commented my code
  • Changed the documentation(if applicable)
  • New files have a license disclaimer
  • The formatting is consistent with the project (project supports .editorconfig)

Summary by CodeRabbit

  • New Features

    • Added support for new permission types related to local and loopback network access.
    • Expanded error handling for DNS-related failures and incognito mode restrictions.
  • Bug Fixes

    • Removed obsolete error codes to streamline error reporting and reduce legacy code overhead.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 31, 2026

📝 Walkthrough

Walkthrough

The pull request updates two CefSharp enum files: CefErrorCode now includes seven new error codes (DNS errors, incognito blocking, HTTP engine placeholder) while removing eight obsolete codes; PermissionRequestType adds two new permission flags for local and loopback network access.

Changes

Cohort / File(s) Summary
Error Code Definitions
CefSharp/Enums/CefErrorCode.cs
Added 7 new error codes: BlockedInIncognitoByAdministrator, HttpengineProviderInUse, and 5 DNS-related codes (DnsFormatError, DnsServerFailure, DnsNotImplemented, DnsRefused, DnsOtherFailure). Removed 8 obsolete codes marked with NET_ERROR comments: NoSslVersionsEnabled, HttpsProxyTunnelResponseRedirect, SslHandshakeNotCompleted, SslBadPeerPublicKey, SynReplyNotReceived, EncodingConversionFailed, UnrecognizedFtpDirectoryListingFormat, and DnsServerFailed.
Permission Type Flags
CefSharp/Enums/PermissionRequestType.cs
Added two new enum members: LocalNetwork (1 << 26) and LoopbackNetwork (1 << 27) to extend permission request bitmask capacity.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 Hop hop, new codes arrive with care,
DNS errors now declared with flair!
Local networks, loopback too,
Obsolete codes bid their adieu!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: updating both CefErrorCode and PermissionRequestType enums.
Description check ✅ Passed The description covers most required template sections with substantive content, including summary, changes, testing status, and types of changes, though some sections are minimal.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@CefSharp/Enums/CefErrorCode.cs`:
- Around line 1364-1376: The enum member name HttpengineProviderInUse in the
CefErrorCode enum uses incorrect PascalCase; rename it to
HttpEngineProviderInUse to match the file's naming conventions (e.g.,
Http2ProtocolError, Http11Required) and keep the same underlying value (-508)
and existing XML doc comment unchanged; update any references/usages of
CefErrorCode.HttpengineProviderInUse throughout the codebase to
CefErrorCode.HttpEngineProviderInUse to avoid build errors.

Comment on lines +1364 to +1376
/// <summary>
/// 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.
/// </summary>
HttpengineProviderInUse = -508,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Search for Http2* and Http11* enum values in the CefErrorCode.cs file to understand the naming pattern
cat CefSharp/Enums/CefErrorCode.cs | grep -E "(Http2|Http11)" | head -20

Repository: cefsharp/CefSharp

Length of output: 515


🌐 Web query:

Chromium error code -508 net_error_list.h constant name

💡 Result:

Chromium net error code -508 corresponds to:

  • Constant in net_error_list.h: HTTPENGINE_PROVIDER_IN_USE
  • Enum / error name used in code: net::ERR_HTTPENGINE_PROVIDER_IN_USE [1]

🏁 Script executed:

# Also search for other HttpEngine references in the file to understand context
rg "HttpEngine" CefSharp/Enums/CefErrorCode.cs

Repository: cefsharp/CefSharp

Length of output: 149


Rename to HttpEngineProviderInUse for PascalCase consistency.
The enum violates the established naming pattern used throughout the file (e.g., Http2ProtocolError, Http11Required). The acronym "Engine" should be capitalized as part of the compound term.

🔧 Proposed fix
-        HttpengineProviderInUse = -508,
+        HttpEngineProviderInUse = -508,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/// <summary>
/// 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.
/// </summary>
HttpengineProviderInUse = -508,
/// <summary>
/// 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.
/// </summary>
HttpEngineProviderInUse = -508,
🤖 Prompt for AI Agents
In `@CefSharp/Enums/CefErrorCode.cs` around lines 1364 - 1376, The enum member
name HttpengineProviderInUse in the CefErrorCode enum uses incorrect PascalCase;
rename it to HttpEngineProviderInUse to match the file's naming conventions
(e.g., Http2ProtocolError, Http11Required) and keep the same underlying value
(-508) and existing XML doc comment unchanged; update any references/usages of
CefErrorCode.HttpengineProviderInUse throughout the codebase to
CefErrorCode.HttpEngineProviderInUse to avoid build errors.

@AppVeyorBot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants