| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_CONFIG_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_CONFIG_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_CONFIG_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_CONFIG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 namespace policy { | 10 namespace policy { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 enum AuthMechanism { | 42 enum AuthMechanism { |
| 43 // Interactive authentication. | 43 // Interactive authentication. |
| 44 AUTH_MECHANISM_INTERACTIVE, | 44 AUTH_MECHANISM_INTERACTIVE, |
| 45 // Automatic authentication relying on the attestation process. | 45 // Automatic authentication relying on the attestation process. |
| 46 AUTH_MECHANISM_ATTESTATION, | 46 AUTH_MECHANISM_ATTESTATION, |
| 47 // Let the system determine the best mechanism (typically the one | 47 // Let the system determine the best mechanism (typically the one |
| 48 // that requires the least user interaction). | 48 // that requires the least user interaction). |
| 49 AUTH_MECHANISM_BEST_AVAILABLE, | 49 AUTH_MECHANISM_BEST_AVAILABLE, |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 // Initializes |mode| to MODE_NONE and |management_domain| to empty string. | |
| 53 EnrollmentConfig(); | |
| 54 | |
| 55 // Whether enrollment should be triggered. | 52 // Whether enrollment should be triggered. |
| 56 bool should_enroll() const { return mode != MODE_NONE; } | 53 bool should_enroll() const { return mode != MODE_NONE; } |
| 57 | 54 |
| 58 // Whether enrollment is forced. The user can't skip the enrollment step | 55 // Whether enrollment is forced. The user can't skip the enrollment step |
| 59 // during OOBE if this returns true. | 56 // during OOBE if this returns true. |
| 60 bool is_forced() const { | 57 bool is_forced() const { |
| 61 return mode == MODE_LOCAL_FORCED || mode == MODE_SERVER_FORCED || | 58 return mode == MODE_LOCAL_FORCED || mode == MODE_SERVER_FORCED || |
| 62 mode == MODE_RECOVERY; | 59 mode == MODE_RECOVERY; |
| 63 } | 60 } |
| 64 | 61 |
| 65 // Indicates the enrollment flow variant to trigger during OOBE. | 62 // Indicates the enrollment flow variant to trigger during OOBE. |
| 66 Mode mode; | 63 Mode mode = MODE_NONE; |
| 67 | 64 |
| 68 // The domain to enroll the device to, if applicable. If this is not set, the | 65 // The domain to enroll the device to, if applicable. If this is not set, the |
| 69 // device may be enrolled to any domain. Note that for the case where the | 66 // device may be enrolled to any domain. Note that for the case where the |
| 70 // device is not already locked to a certain domain, this value is used for | 67 // device is not already locked to a certain domain, this value is used for |
| 71 // display purposes only and the server makes the final decision on which | 68 // display purposes only and the server makes the final decision on which |
| 72 // domain the device should be enrolled with. If the device is already locked | 69 // domain the device should be enrolled with. If the device is already locked |
| 73 // to a domain, policy validation during enrollment will verify the domains | 70 // to a domain, policy validation during enrollment will verify the domains |
| 74 // match. | 71 // match. |
| 75 std::string management_domain; | 72 std::string management_domain; |
| 76 | 73 |
| 77 // The authentication mechanism to use. | 74 // The authentication mechanism to use. |
| 78 AuthMechanism auth_mechanism; | 75 // TODO(drcrash): Change to best available once ZTE is everywhere. |
| 76 AuthMechanism auth_mechanism = AUTH_MECHANISM_INTERACTIVE; |
| 79 }; | 77 }; |
| 80 | 78 |
| 81 } // namespace policy | 79 } // namespace policy |
| 82 | 80 |
| 83 #endif // CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_CONFIG_H_ | 81 #endif // CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_CONFIG_H_ |
| OLD | NEW |