| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 AutoEnrollmentController(); | 64 AutoEnrollmentController(); |
| 65 ~AutoEnrollmentController(); | 65 ~AutoEnrollmentController(); |
| 66 | 66 |
| 67 // Starts the auto-enrollment check. | 67 // 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. |
| 68 void Start(); | 69 void Start(); |
| 69 | 70 |
| 70 // Stops any pending auto-enrollment checking. | |
| 71 void Cancel(); | |
| 72 | |
| 73 // Retry checking. | 71 // Retry checking. |
| 74 void Retry(); | 72 void Retry(); |
| 75 | 73 |
| 76 // Registers a callback to invoke on state changes. | 74 // Registers a callback to invoke on state changes. |
| 77 std::unique_ptr<ProgressCallbackList::Subscription> RegisterProgressCallback( | 75 std::unique_ptr<ProgressCallbackList::Subscription> RegisterProgressCallback( |
| 78 const ProgressCallbackList::CallbackType& callback); | 76 const ProgressCallbackList::CallbackType& callback); |
| 79 | 77 |
| 80 policy::AutoEnrollmentState state() const { return state_; } | 78 policy::AutoEnrollmentState state() const { return state_; } |
| 81 | 79 |
| 82 private: | 80 private: |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 base::WeakPtrFactory<AutoEnrollmentController> client_start_weak_factory_{ | 131 base::WeakPtrFactory<AutoEnrollmentController> client_start_weak_factory_{ |
| 134 this}; | 132 this}; |
| 135 base::WeakPtrFactory<AutoEnrollmentController> weak_ptr_factory_{this}; | 133 base::WeakPtrFactory<AutoEnrollmentController> weak_ptr_factory_{this}; |
| 136 | 134 |
| 137 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentController); | 135 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentController); |
| 138 }; | 136 }; |
| 139 | 137 |
| 140 } // namespace chromeos | 138 } // namespace chromeos |
| 141 | 139 |
| 142 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CONTROLLER_H
_ | 140 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CONTROLLER_H
_ |
| OLD | NEW |