Skip to content

Core - Update CefErrorCode and PermissionRequestType#5213

Merged
amaitland merged 2 commits intocefsharp:masterfrom
campersau:updateceferrorcode
Feb 17, 2026
Merged

Core - Update CefErrorCode and PermissionRequestType#5213
amaitland merged 2 commits intocefsharp:masterfrom
campersau:updateceferrorcode

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 permission types for local and loopback network access.
    • Expanded DNS and network error reporting with several new error categories.
    • Added a new indicator for HTTP engine provider usage.
  • Bug Fixes

    • Removed and marked obsolete several legacy/SSL/SPDY/FTP-related error entries to simplify reporting.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 31, 2026

📝 Walkthrough

Walkthrough

CefSharp enum updates: CefErrorCode adds several DNS and other error codes, removes/marks multiple obsolete NET_ERROR entries; 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: BlockedInIncognitoByAdministrator = -35, HttpEngineProviderInUse = -508, and DNS codes DnsFormatError = -816, DnsServerFailure = -817, DnsNotImplemented = -818, DnsRefused = -819, DnsOtherFailure = -820. Removed or replaced with obsolete NET_ERROR notes: NoSslVersionsEnabled (-112), HttpsProxyTunnelResponseRedirect (-140), SslHandshakeNotCompleted (-148), SslBadPeerPublicKey (-149), SynReplyNotReceived (-332), EncodingConversionFailed (-333), UnrecognizedFtpDirectoryListingFormat (-334), and DnsServerFailed (-802); many entries annotated with explanatory obsolete comments.
Permission Type Flags
CefSharp/Enums/PermissionRequestType.cs
Added two new enum members: LocalNetwork = 1 << 26 and LoopbackNetwork = 1 << 27, extending permission bitmask flags while preserving existing values.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I nibble code and stamp my paw,

New DNS names, a clearer law.
Local hops and loopback trails,
Old errors folded into tales.
Hop on—these enums tell the tale.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Core - Update CefErrorCode and PermissionRequestType' accurately summarizes the main changes in the pull request, which involve updating two enum types.
Description check ✅ Passed The pull request description addresses all required template sections including summary, changes, testing, types of changes, and checklist items.
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

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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
Contributor

@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.

@AppVeyorBot
Copy link

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@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.

🧹 Nitpick comments (1)
CefSharp/Enums/CefErrorCode.cs (1)

278-279: Consider using [Obsolete] attributes before removing enum members outright.

Eight enum members are removed in this PR (NoSslVersionsEnabled, HttpsProxyTunnelResponseRedirect, SslHandshakeNotCompleted, SslBadPeerPublicKey, SynReplyNotReceived, EncodingConversionFailed, UnrecognizedFtpDirectoryListingFormat, DnsServerFailed). While the PR is correctly marked as a breaking change, adding [Obsolete("Removed in Chromium 145", error: true)] for one release cycle would give downstream consumers a clear compiler message and a smoother migration path, rather than an unexplained missing-symbol error.

This is entirely optional if CefSharp's versioning policy permits hard breaks aligned with Chromium updates.

Example for one of the removed members
[Obsolete("Removed upstream. See Chromium 145 net_error_list.h.", error: true)]
NoSslVersionsEnabled = -112,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CefSharp/Enums/CefErrorCode.cs` around lines 278 - 279, Add Obsolete
attributes for the enum members removed in this PR so consumers get a clear
compiler message: for each removed member (NoSslVersionsEnabled,
HttpsProxyTunnelResponseRedirect, SslHandshakeNotCompleted, SslBadPeerPublicKey,
SynReplyNotReceived, EncodingConversionFailed,
UnrecognizedFtpDirectoryListingFormat, DnsServerFailed) in CefErrorCode
(CefSharp/Enums/CefErrorCode.cs) declare the member with [Obsolete("Removed
upstream. See Chromium 145 net_error_list.h.", error: true)] and keep the
original numeric value for one release cycle before actually deleting the member
to provide a smooth migration path.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@CefSharp/Enums/CefErrorCode.cs`:
- Around line 1364-1376: The enum member HttpEngineProviderInUse is correctly
PascalCased, but there's a leftover duplicate-review marker; remove the stray
"[duplicate_comment]" artifact from the PR/comment and ensure there are no
duplicated XML doc remarks for the CefErrorCode.HttpEngineProviderInUse enum
entry so the documentation block appears only once and remains exactly as shown.

---

Nitpick comments:
In `@CefSharp/Enums/CefErrorCode.cs`:
- Around line 278-279: Add Obsolete attributes for the enum members removed in
this PR so consumers get a clear compiler message: for each removed member
(NoSslVersionsEnabled, HttpsProxyTunnelResponseRedirect,
SslHandshakeNotCompleted, SslBadPeerPublicKey, SynReplyNotReceived,
EncodingConversionFailed, UnrecognizedFtpDirectoryListingFormat,
DnsServerFailed) in CefErrorCode (CefSharp/Enums/CefErrorCode.cs) declare the
member with [Obsolete("Removed upstream. See Chromium 145 net_error_list.h.",
error: true)] and keep the original numeric value for one release cycle before
actually deleting the member to provide a smooth migration path.

@AppVeyorBot
Copy link

@amaitland amaitland merged commit ba3f998 into cefsharp:master Feb 17, 2026
2 checks passed
@campersau campersau deleted the updateceferrorcode branch February 17, 2026 11:18
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.

3 participants