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_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CONTROLLER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CONTROLLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 // FRE check explicitly required by the flag in VPD. | 54 // FRE check explicitly required by the flag in VPD. |
55 EXPLICITLY_REQUIRED, | 55 EXPLICITLY_REQUIRED, |
56 // FRE check to be skipped, explicitly stated by the flag in VPD. | 56 // FRE check to be skipped, explicitly stated by the flag in VPD. |
57 EXPLICITLY_NOT_REQUIRED, | 57 EXPLICITLY_NOT_REQUIRED, |
58 }; | 58 }; |
59 | 59 |
60 // Gets the auto-enrollment mode based on command-line flags and official | 60 // Gets the auto-enrollment mode based on command-line flags and official |
61 // build status. | 61 // build status. |
62 static Mode GetMode(); | 62 static Mode GetMode(); |
63 | 63 |
64 // Returns whether the auto-enrollment check is required. When | |
65 // kCheckEnrollmentKey VPD entry is present, it is explicitly stating whether | |
66 // the forced re-enrollment is required or not. Otherwise, for backward | |
67 // compatibility with devices upgrading from an older version of Chrome OS, | |
68 // the kActivateDateKey VPD entry is queried. If it's missing, FRE is not | |
69 // required. This enables factories to start full guest sessions for testing, | |
70 // see http://crbug.com/397354 for more context. The requirement for the | |
71 // machine serial number to be present is a sanity-check to ensure that the | |
72 // VPD has actually been read successfully. If VPD read failed, the FRE check | |
73 // is required. | |
74 static FRERequirement GetFRERequirement(); | |
achuithb
2017/05/23 19:59:01
Why not have:
bool IsForcedAutoEnrollmentRequired(
| |
75 | |
64 AutoEnrollmentController(); | 76 AutoEnrollmentController(); |
65 ~AutoEnrollmentController(); | 77 ~AutoEnrollmentController(); |
66 | 78 |
67 // Starts the auto-enrollment check. Safe to call multiple times: aborts in | 79 // Starts the auto-enrollment check. Safe to call multiple times: aborts in |
68 // case a check is currently running or a decision has already been made. | 80 // case a check is currently running or a decision has already been made. |
69 void Start(); | 81 void Start(); |
70 | 82 |
71 // Retry checking. | 83 // Retry checking. |
72 void Retry(); | 84 void Retry(); |
73 | 85 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 base::WeakPtrFactory<AutoEnrollmentController> client_start_weak_factory_{ | 143 base::WeakPtrFactory<AutoEnrollmentController> client_start_weak_factory_{ |
132 this}; | 144 this}; |
133 base::WeakPtrFactory<AutoEnrollmentController> weak_ptr_factory_{this}; | 145 base::WeakPtrFactory<AutoEnrollmentController> weak_ptr_factory_{this}; |
134 | 146 |
135 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentController); | 147 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentController); |
136 }; | 148 }; |
137 | 149 |
138 } // namespace chromeos | 150 } // namespace chromeos |
139 | 151 |
140 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CONTROLLER_H _ | 152 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CONTROLLER_H _ |
OLD | NEW |