8000 refactor: extract-constant static Windows registry keys in Browser code by ckerr · Pull Request #47569 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor: extract-constant static Windows registry keys in Browser code #47569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ckerr
Copy link
Member
@ckerr ckerr commented Jun 25, 2025

Description of Change

browser_win.cc has a lot of redundant declarations of Windows registry keys. This PR makes symbolic constants for them and uses those instead. The symbolic constants are declared as constexpr base::wcstring_view to avoid the need for std::wstring temporaries.

Checklist

Release Notes

Notes: none.

@ckerr ckerr added semver/patch backwards-compatible bug fixes target/38-x-y PR should also be added to the "38-x-y" branch. labels Jun 25, 2025
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jun 25, 2025
@ckerr ckerr marked this pull request as draft June 25, 2025 22:08
HKEY hkey;
// StartupApproved registry path
LPCTSTR path = TEXT(
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StartupApp"
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: keys are case-insensitive. The old value of SOFTWARE\Foo\Bar here is inconsistent with the other code in the file that used Software\Foo\Bar instead, but it's functionally equivalent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-pr 🌱 PR opened recently semver/patch backwards-compatible bug fixes target/38-x-y PR should also be added to the "38-x-y" branch.
45BB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0