Fix emulator build error
[platform/framework/web/chromium-efl.git] / base / enterprise_util_win.cc
1 // Copyright 2019 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/enterprise_util.h"
6
7 #include "base/win/win_util.h"
8 #include "base/win/windows_version.h"
9
10 namespace base {
11
12 bool IsManagedDevice() {
13   // Legacy domain join does not actually guarantee that the device is managed,
14   // however there is no API that can be used to determine if any group policies
15   // are actually being applied. As such, for these devices we need to assume
16   // they are managed.
17   // In addition, simply being joined to AAD does not mean the device is being
18   // managed by the AAD tenant, so checking for AAD join is not included here.
19   return base::win::IsEnrolledToDomain() ||
20          base::win::IsDeviceRegisteredWithManagement();
21 }
22
23 bool IsEnterpriseDevice() {
24   // Both legacy domain join and AAD join represent machine-wide enterprise
25   // join.
26   return base::win::IsEnrolledToDomain() || base::win::IsJoinedToAzureAD();
27 }
28
29 }  // namespace base