Index: base/win/win_util.cc |
=================================================================== |
--- base/win/win_util.cc (revision 249340) |
+++ base/win/win_util.cc (working copy) |
@@ -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 @@ |
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 |