Skip to content

Core - Add chrome_policy_id to CefSettings#5227

Open
strau0106 wants to merge 1 commit intocefsharp:masterfrom
strau0106:master
Open

Core - Add chrome_policy_id to CefSettings#5227
strau0106 wants to merge 1 commit intocefsharp:masterfrom
strau0106:master

Conversation

@strau0106
Copy link

@strau0106 strau0106 commented Mar 25, 2026

Summary:
Cef allows a chrome_policy_id to be set, to allow for an enterprise policy to be set. Cef introduced this feature here

Changes:
I added a ChromePolicyID field to the relevant locations, to allow this id to be set in the cef_settings object.

How Has This Been Tested?

I tested if the policies are loaded, which they are. To test chrome policy commandline argument also has to be set.

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)
  • The formatting is consistent with the project (project supports .editorconfig)

Summary by CodeRabbit

  • New Features
    • Added ChromePolicyId property to application settings, enabling configuration and management of Chrome Policy identifiers.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 012aa15c-02d0-4656-ab9f-dbbbb1863031

📥 Commits

Reviewing files that changed from the base of the PR and between 017876e and 55b4bd8.

📒 Files selected for processing (2)
  • CefSharp.Core.Runtime/CefSettingsBase.h
  • CefSharp.Core/CefSettingsBase.cs

📝 Walkthrough

Walkthrough

Added a public ChromePolicyId property to CefSettingsBase across both the C# managed layer and C++/CLR interop layer, with appropriate string conversion bindings between managed and native types.

Changes

Cohort / File(s) Summary
ChromePolicy Property Addition
CefSharp.Core.Runtime/CefSettingsBase.h, CefSharp.Core/CefSettingsBase.cs
Added new public ChromePolicyId property that maps to native chrome_policy_id field. C++/CLR layer handles string conversion via StringUtils, while C# layer provides a simple pass-through getter/setter.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A policy ID now takes flight,
Chrome settings aligned just right,
Native and managed in perfect sync,
No bugs here, not even a chink!
Simple properties, clean and tight! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding chrome_policy_id support to CefSettings.
Description check ✅ Passed The description covers all major template sections with appropriate detail: summary, changes, testing, and types of changes are completed.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@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