Chromium Code Reviews| Index: base/win/win_util.cc |
| diff --git a/base/win/win_util.cc b/base/win/win_util.cc |
| index e0d0de1b418866d960598d3f983fb4e24b5df298..802c9e6a14d5a016fee700aa3e20f240ffb21ecf 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) ? |
|
Nico
2016/06/09 19:15:10
the interwebs claim IsOS returns a BOOL -- why the
robliao
2016/06/09 19:43:36
Indeed. That was an artifact of me removing the ca
|
| ENROLLED : NOT_ENROLLED, |
| UNKNOWN); |
| } |