Index: base/win/win_util.cc |
diff --git a/base/win/win_util.cc b/base/win/win_util.cc |
index e0d0de1b418866d960598d3f983fb4e24b5df298..ce59baa287d4e9820ea4428492c27834d5e37b05 100644 |
--- a/base/win/win_util.cc |
+++ b/base/win/win_util.cc |
@@ -6,7 +6,6 @@ |
#include <aclapi.h> |
#include <cfgmgr32.h> |
-#include <lm.h> |
#include <powrprof.h> |
#include <shobjidl.h> // Must be before propkey. |
#include <initguid.h> |
@@ -17,6 +16,7 @@ |
#include <roapi.h> |
#include <sddl.h> |
#include <setupapi.h> |
+#include <shlwapi.h> |
#include <signal.h> |
#include <stddef.h> |
#include <stdlib.h> |
@@ -518,20 +518,15 @@ bool IsTabletDevice(std::string* reason) { |
return is_tablet; |
} |
-enum DomainEnrollementState {UNKNOWN = -1, NOT_ENROLLED, ENROLLED}; |
+enum DomainEnrollmentState {UNKNOWN = -1, NOT_ENROLLED, ENROLLED}; |
static volatile long int g_domain_state = UNKNOWN; |
bool IsEnrolledToDomain() { |
// Doesn't make any sense to retry inside a user session because joining a |
// domain will only kick in on a restart. |
if (g_domain_state == UNKNOWN) { |
- LPWSTR domain; |
- NETSETUP_JOIN_STATUS join_status; |
- if(::NetGetJoinInformation(NULL, &domain, &join_status) != NERR_Success) |
- return false; |
- ::NetApiBufferFree(domain); |
::InterlockedCompareExchange(&g_domain_state, |
- join_status == ::NetSetupDomainName ? |
+ IsOS(OS_DOMAINMEMBER) ? |
ENROLLED : NOT_ENROLLED, |
UNKNOWN); |
} |