Update broken references to image assets
[chromium-blink-merge.git] / chrome / browser / chromeos / policy / enrollment_config.h
blobbcedac9bfdc9f252fc7d4545468c30a6bf1377e5
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_
8 #include <string>
10 namespace policy {
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.
19 enum Mode {
20 // Enrollment not applicable.
21 MODE_NONE,
22 // Manually triggered initial enrollment.
23 MODE_MANUAL,
24 // Manually triggered re-enrollment.
25 MODE_MANUAL_REENROLLMENT,
26 // Forced enrollment triggered by local OEM manifest or device requisition,
27 // user can't skip.
28 MODE_LOCAL_FORCED,
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.
33 MODE_SERVER_FORCED,
34 // Server-backed-state-triggered advertised enrollment, user can skip.
35 MODE_SERVER_ADVERTISED,
36 // Recover from "spontaneous unenrollment", user can't skip.
37 MODE_RECOVERY,
40 // Initializes |mode| to MODE_NONE and |management_domain| to empty string.
41 EnrollmentConfig();
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.
54 Mode mode;
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
62 // match.
63 std::string management_domain;
66 } // namespace policy
68 #endif // CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_CONFIG_H_