Skip to content

Conversation

@campersau
Copy link
Contributor

@campersau campersau commented Dec 16, 2025

I needed the new PermissionRequestType.LocalNetworkAccess but it was missing, so I synced it and also updated CefErrorCode again.

Summary:
Updated CefErrorCode using https://raw.githubusercontent.com/chromium/chromium/143.0.7499.40/net/base/net_error_list.h and steps described in #3785
Updated PermissionRequestType using https://github.com/chromiumembedded/cef/blob/8aed01b55e1b242b2b3df82a87f321a5cc2b6762/include/internal/cef_types.h#L3812-L3847

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 hand tracking and web app installation permissions.
    • Enhanced local network access permission handling.
    • Improved error reporting for proxy and storage operations with new diagnostic codes.
    • Added DNS cache invalidation tracking.

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

@coderabbitai
Copy link

coderabbitai bot commented Dec 16, 2025

Walkthrough

This PR updates two enum files in CefSharp: CefErrorCode adds proxy, DNS cache invalidation, and blob-related error codes while removing H2OrQuicRequired and renaming local network access policy codes; PermissionRequestType removes AccessibilityEvents, renames Identity_Provider to IdentityProvider, and adds new permission types with bit-flag reordering.

Changes

Cohort / File(s) Summary
Enum Definitions
CefSharp/Enums/CefErrorCode.cs
Removed H2OrQuicRequired (-31); added ProxyUnableToConnectToDestination (-186), ProxyDelegateCanceledConnectRequest (-187), ProxyDelegateCanceledConnectResponse (-188); renamed CachedIpAddressSpaceBlockedByPrivateNetworkAccessPolicy and BlockedByPrivateNetworkAccessChecks to use "LocalNetworkAccessPolicy" terminology; added DnsCacheInvalidationInProgress (-815); added blob error range (BlobInvalidConstructionArguments through BlobReferencedFileUnavailable, -900 to -906).
Enum Definitions
CefSharp/Enums/PermissionRequestType.cs
Removed AccessibilityEvents member; renamed Identity_Provider to IdentityProvider; added HandTracking, WebAppInstallation, and LocalNetworkAccess members; reordered bit-flag positions for WindowManagement, FileSystemAccess, and adjacent members to accommodate new entries.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • PermissionRequestType.cs: Bit-flag reordering is safety-critical; verify no collisions across all member positions (1<<0 to 1<<25). Breaking removal of AccessibilityEvents and renaming of Identity_Provider require validation for consumer compatibility.
  • CefErrorCode.cs: Verify new proxy and blob error codes align with upstream Chromium/CEF semantics; confirm H2OrQuicRequired removal is intentional and handle any downstream code that may reference it; cross-check documentation references between TunnelConnectionFailed and PROXY_UNABLE_TO_CONNECT_TO_DESTINATION.

Possibly related PRs

Poem

🐰 New errors hopping 'cross the field—
Blobs and proxies now revealed!
Bit flags dancing, swift rearrange,
CefSharp's enums gently change.
Permissions renamed, all's complete,
Our growing list—a thorough feat!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: updating two core enum types (CefErrorCode and PermissionRequestType) with new values and renamings from upstream Chromium/CEF sources.
Description check ✅ Passed The description covers all required template sections: summary explains the need for LocalNetworkAccess and enum sync, changes specify which enums were modified, testing confirms build works, and appropriate checkboxes are marked for breaking changes and documentation updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3e03c42 and d621b38.

📒 Files selected for processing (2)
  • CefSharp/Enums/CefErrorCode.cs (6 hunks)
  • CefSharp/Enums/PermissionRequestType.cs (2 hunks)
🔇 Additional comments (8)
CefSharp/Enums/PermissionRequestType.cs (2)

40-43: Bit position shifts are a subtle but significant breaking change.

WindowManagement moved from 1<<22 to 1<<23 and FileSystemAccess moved from 1<<23 to 1<<24. This means any persisted/serialized permission values or bitwise comparisons using the old positions will now be misinterpreted.

WebAppInstallation (1<<22) and LocalNetworkAccess (1<<25) are correctly added per the PR objective.

If permission flags are persisted anywhere (databases, configs), consumers will need a migration strategy.


17-28: Breaking changes: member removal and renaming require documentation.

PermissionRequestType should be kept in sync with Chromium's permissions::RequestType type. The changes indicate AccessibilityEvents has been removed and Identity_Provider has been renamed to IdentityProvider. These are breaking changes for consumers of this enum.

Ensure release notes document these breaking changes and provide migration guidance for code using the removed or renamed members.

CefSharp/Enums/CefErrorCode.cs (6)

32-32: LGTM! Range documentation added.

The addition of the blob error range (900-999) appropriately documents the new error codes added later in the file.


189-190: LGTM! Proper documentation of removed error code.

Documenting the removal of H2_OR_QUIC_REQUIRED while preserving the value slot is good practice for maintaining backward compatibility and preventing value reuse.


267-268: LGTM! Improved cross-reference documentation.

The updated documentation properly references PROXY_UNABLE_TO_CONNECT_TO_DESTINATION, which helps clarify the relationship between these related error codes.


1547-1551: LGTM! Well-documented DNS error addition.

The DnsCacheInvalidationInProgress error code is properly documented with clear guidance for callers about its transient nature and retry semantics.


1553-1594: LGTM! Comprehensive blob error code additions.

The blob error codes are well-documented and provide comprehensive coverage of blob-related failure scenarios. The mapping from storage::BlobStatus is clearly indicated, and each error code has descriptive documentation explaining the specific failure condition.


1236-1236: Breaking change: Enum members renamed to align with Chromium terminology.

The following error codes have been renamed:

  • CachedIpAddressSpaceBlockedByPrivateNetworkAccessPolicyCachedIpAddressSpaceBlockedByLocalNetworkAccessPolicy
  • BlockedByPrivateNetworkAccessChecksBlockedByLocalNetworkAccessChecks

No internal references to the old names exist in the codebase. The breaking change is isolated to external consumers of this enum.

@AppVeyorBot
Copy link

@amaitland
Copy link
Member

Thanks, will look at merging shortly.

@amaitland amaitland merged commit 7dac43c into cefsharp:master Dec 22, 2025
2 checks passed
@campersau campersau deleted the updateerrorcodepermissionrequesttype branch December 22, 2025 06:45
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