1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_CONFIG_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_CONFIG_H_
12 // A container keeping all parameters relevant to whether and how enterprise
13 // enrollment of a device should occur. This configures the behavior of the
14 // enrollment flow during OOBE, i.e. whether the enrollment screen starts
15 // automatically, whether the user can skip enrollment, and what domain to
16 // display as owning the device.
17 struct EnrollmentConfig
{
18 // Describes the enrollment mode, i.e. what triggered enrollment.
20 // Enrollment not applicable.
22 // Manually triggered initial enrollment.
24 // Manually triggered re-enrollment.
25 MODE_MANUAL_REENROLLMENT
,
26 // Forced enrollment triggered by local OEM manifest or device requisition,
29 // Advertised enrollment triggered by local OEM manifest or device
30 // requisition, user can skip.
31 MODE_LOCAL_ADVERTISED
,
32 // Server-backed-state-triggered forced enrollment, user can't skip.
34 // Server-backed-state-triggered advertised enrollment, user can skip.
35 MODE_SERVER_ADVERTISED
,
36 // Recover from "spontaneous unenrollment", user can't skip.
40 // Initializes |mode| to MODE_NONE and |management_domain| to empty string.
43 // Whether enrollment should be triggered.
44 bool should_enroll() const { return mode
!= MODE_NONE
; }
46 // Whether enrollment is forced. The user can't skip the enrollment step
47 // during OOBE if this returns true.
48 bool is_forced() const {
49 return mode
== MODE_LOCAL_FORCED
|| mode
== MODE_SERVER_FORCED
||
50 mode
== MODE_RECOVERY
;
53 // Indicates the enrollment flow variant to trigger during OOBE.
56 // The domain to enroll the device to, if applicable. If this is not set, the
57 // device may be enrolled to any domain. Note that for the case where the
58 // device is not already locked to a certain domain, this value is used for
59 // display purposes only and the server makes the final decision on which
60 // domain the device should be enrolled with. If the device is already locked
61 // to a domain, policy validation during enrollment will verify the domains
63 std::string management_domain
;
68 #endif // CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_CONFIG_H_