Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: chrome_elf/chrome_elf_security.cc

Issue 2507263002: Make nt_registry Create/OpenRegKey return a scoped object
Patch Set: fixes Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome_elf/chrome_elf_security.cc
diff --git a/chrome_elf/chrome_elf_security.cc b/chrome_elf/chrome_elf_security.cc
index 2b3c8258ea2d53065639aef9f8f8315b4500b237..4e6f2a4864e904c595e21eef0703d24e9af81fef 100644
--- a/chrome_elf/chrome_elf_security.cc
+++ b/chrome_elf/chrome_elf_security.cc
@@ -19,13 +19,12 @@ void EarlyBrowserSecurity() {
// This function is called from within DllMain.
// Don't do anything naughty while we have the loader lock.
NTSTATUS ret_val = STATUS_SUCCESS;
- HANDLE handle = INVALID_HANDLE_VALUE;
// Check for kRegistrySecurityFinchPath. If it exists,
// we do NOT disable extension points. (Emergency off flag.)
if (nt::OpenRegKey(nt::HKCU, elf_sec::kRegSecurityFinchPath, KEY_QUERY_VALUE,
- &handle, &ret_val)) {
- nt::CloseRegKey(handle);
+ &ret_val)
+ .is_valid()) {
return;
}
#ifdef _DEBUG

Powered by Google App Engine
This is Rietveld 408576698