• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_TYPES_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_TYPES_H_
7 
8 namespace policy {
9 
10 // The scope of a policy flags whether it is meant to be applied to the current
11 // user or to the machine.  Note that this property pertains to the source of
12 // the policy and has no direct correspondence to the distinction between User
13 // Policy and Device Policy.
14 enum PolicyScope {
15   // USER policies apply to sessions of the current user.
16   POLICY_SCOPE_USER,
17 
18   // MACHINE policies apply to any users of the current machine.
19   POLICY_SCOPE_MACHINE,
20 };
21 
22 // The level of a policy determines its enforceability and whether users can
23 // override it or not. The values are listed in increasing order of priority.
24 enum PolicyLevel {
25   // RECOMMENDED policies can be overridden by users. They are meant as a
26   // default value configured by admins, that users can customize.
27   POLICY_LEVEL_RECOMMENDED,
28 
29   // MANDATORY policies must be enforced and users can't circumvent them.
30   POLICY_LEVEL_MANDATORY,
31 };
32 
33 // The source of a policy indicates where its value is originating from. The
34 // sources are ordered by priority (with weakest policy first).
35 enum PolicySource {
36   // The policy was set because we are running in an enterprise environment.
37   POLICY_SOURCE_ENTERPRISE_DEFAULT,
38 
39   // The policy was set by a cloud source.
40   POLICY_SOURCE_CLOUD,
41 
42   // The policy was set by an Active Directory source.
43   POLICY_SOURCE_ACTIVE_DIRECTORY,
44 
45   // Any non-platform policy was overridden because we are running in a
46   // public session.
47   POLICY_SOURCE_PUBLIC_SESSION_OVERRIDE,
48 
49   // The policy was set by a platform source.
50   POLICY_SOURCE_PLATFORM,
51 
52   // Number of source types. Has to be the last element.
53   POLICY_SOURCE_COUNT
54 };
55 
56 }  // namespace policy
57 
58 #endif  // COMPONENTS_POLICY_CORE_COMMON_POLICY_TYPES_H_
59