Index: base/win/win_util.cc |
diff --git a/base/win/win_util.cc b/base/win/win_util.cc |
index cc64c650cb6580bbe41ee1438329b18f4875f6d2..5d39cf0f7e0bafe1444a1c90c7a6633985ab78f8 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,17 @@ BOOL GetMonitorInfoWrapper(HMONITOR monitor, MONITORINFO* mi) { |
return ret; |
} |
+bool IsEnrolledToDomain() { |
+ LPWSTR domain; |
+ NETSETUP_JOIN_STATUS join_status; |
+ if(NERR_Success != ::NetGetJoinInformation(NULL, &domain, &join_status)) { |
gab
2014/01/21 15:04:53
nit: remove {}
gab
2014/01/21 15:04:53
nit: Put constant on RHS of !=
pastarmovj
2014/01/21 15:30:31
Right. This used to be longer in the UMA version :
|
+ return false; |
+ } |
+ ::NetApiBufferFree(domain); |
+ |
+ return join_status == NetSetupDomainName; |
gab
2014/01/21 15:04:53
Would ::NetSetupDomainName compile? It would look
pastarmovj
2014/01/21 15:30:31
Done.
|
+} |
+ |
} // namespace win |
} // namespace base |