Index: base/win/win_util.cc |
diff --git a/base/win/win_util.cc b/base/win/win_util.cc |
index cc64c650cb6580bbe41ee1438329b18f4875f6d2..7b85418a1ea79917215a33ec5e0fc125c99fe15b 100644 |
--- a/base/win/win_util.cc |
+++ b/base/win/win_util.cc |
@@ -5,6 +5,7 @@ |
#include "base/win/win_util.h" |
#include <aclapi.h> |
+#include <lm.h> |
#include <shellapi.h> |
#include <shlobj.h> |
#include <shobjidl.h> // Must be before propkey. |
@@ -355,6 +356,16 @@ BOOL GetMonitorInfoWrapper(HMONITOR monitor, MONITORINFO* mi) { |
return ret; |
} |
+bool IsEnrolledToDomain() { |
+ LPWSTR domain; |
+ NETSETUP_JOIN_STATUS join_status; |
+ if(::NetGetJoinInformation(NULL, &domain, &join_status) != NERR_Success) |
+ return false; |
+ ::NetApiBufferFree(domain); |
+ |
+ return join_status == ::NetSetupDomainName; |
+} |
+ |
} // namespace win |
} // namespace base |