91a42c41460b44d3a2eb494ccf678aefafaf5b20 - chromium/src

1,287 views
Skip to first unread message

aj...@chromium.org

unread,
Mar 1, 2022, 6:44:49 PM3/1/22
to chromium...@chromium.org
commit 91a42c41460b44d3a2eb494ccf678aefafaf5b20
Author: Alex Gough <aj...@chromium.org>
AuthorDate: Tue Mar 01 23:43:32 2022
Commit: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
CommitDate: Tue Mar 01 23:43:32 2022

Remove unused function GetReservedKeyFromName from win_utils.h

Bug: 1270309
Change-Id: I0d0e9eaf023b6d9bfbeb65f434f77136b2299586
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3498631
Reviewed-by: Will Harris <w...@chromium.org>
Commit-Queue: Alex Gough <aj...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#976469}

diff --git a/sandbox/win/src/win_utils.cc b/sandbox/win/src/win_utils.cc
index d60c996..279f044 100644
--- a/sandbox/win/src/win_utils.cc
+++ b/sandbox/win/src/win_utils.cc
@@ -181,15 +181,6 @@
return EqualPath(path, start, kPipe, std::size(kPipe) - 1);
}

-HKEY GetReservedKeyFromName(const std::wstring& name) {
- for (size_t i = 0; i < std::size(kKnownKey); ++i) {
- if (name == kKnownKey[i].name)
- return kKnownKey[i].key;
- }
-
- return nullptr;
-}
-
bool ResolveRegistryName(std::wstring name, std::wstring* resolved_name) {
for (size_t i = 0; i < std::size(kKnownKey); ++i) {
if (name.find(kKnownKey[i].name) == 0) {
diff --git a/sandbox/win/src/win_utils.h b/sandbox/win/src/win_utils.h
index 4da3f64..a8435495 100644
--- a/sandbox/win/src/win_utils.h
+++ b/sandbox/win/src/win_utils.h
@@ -80,11 +80,6 @@
// Resolves a handle to its type name. Returns true if successful.
bool GetTypeNameFromHandle(HANDLE handle, std::wstring* type_name);

-// Translates a reserved key name to its handle.
-// For example "HKEY_LOCAL_MACHINE" returns HKEY_LOCAL_MACHINE.
-// Returns nullptr if the name does not represent any reserved key name.
-HKEY GetReservedKeyFromName(const std::wstring& name);
-
// Resolves a user-readable registry path to a system-readable registry path.
// For example, HKEY_LOCAL_MACHINE\\Software\\microsoft is translated to
// \\registry\\machine\\software\\microsoft. Returns false if the path
Reply all
Reply to author
Forward
0 new messages