Index: rlz/win/lib/registry_util.cc |
diff --git a/rlz/win/lib/registry_util.cc b/rlz/win/lib/registry_util.cc |
index 61197d2239f17c6e13f175adfdd253e8e25e7338..8fba7dd47aa2f3b14368d62705786091154b5f76 100644 |
--- a/rlz/win/lib/registry_util.cc |
+++ b/rlz/win/lib/registry_util.cc |
@@ -7,7 +7,7 @@ |
#include "rlz/win/lib/registry_util.h" |
-#include "base/process/process_handle.h" |
+#include "base/process/process_info.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/win/registry.h" |
#include "base/win/windows_version.h" |
@@ -58,15 +58,10 @@ bool HasUserKeyAccess(bool write_access) { |
} |
if (write_access) { |
- if (base::win::GetVersion() < base::win::VERSION_VISTA) return true; |
- base::ProcessHandle process_handle = base::GetCurrentProcessHandle(); |
- base::IntegrityLevel level = base::INTEGRITY_UNKNOWN; |
+ if (base::win::GetVersion() < base::win::VERSION_VISTA) |
+ return true; |
- if (!base::GetProcessIntegrityLevel(process_handle, &level)) { |
- ASSERT_STRING("UserKey::HasAccess: Cannot determine Integrity Level."); |
- return false; |
- } |
- if (level <= base::LOW_INTEGRITY) { |
+ if (base::GetCurrentProcessIntegrityLevel() <= base::LOW_INTEGRITY) { |
ASSERT_STRING("UserKey::HasAccess: Cannot write from Low Integrity."); |
return false; |
} |