| Index: chrome/browser/chromeos/policy/enrollment_handler_chromeos.h
|
| diff --git a/chrome/browser/chromeos/policy/enrollment_handler_chromeos.h b/chrome/browser/chromeos/policy/enrollment_handler_chromeos.h
|
| index 73b5b627fa598bca02e838817e8ae786634a67e6..95166d0bcbc17d32fd902a23f4553aef80dcf556 100644
|
| --- a/chrome/browser/chromeos/policy/enrollment_handler_chromeos.h
|
| +++ b/chrome/browser/chromeos/policy/enrollment_handler_chromeos.h
|
| @@ -56,8 +56,9 @@ class EnrollmentHandlerChromeOS : public CloudPolicyClient::Observer,
|
| public CloudPolicyStore::Observer,
|
| public gaia::GaiaOAuthClient::Delegate {
|
| public:
|
| - typedef DeviceCloudPolicyInitializer::EnrollmentCallback
|
| - EnrollmentCallback;
|
| + using EnrollmentCallback = DeviceCloudPolicyInitializer::EnrollmentCallback;
|
| + using AvailableLicensesCallback =
|
| + DeviceCloudPolicyInitializer::AvailableLicensesCallback;
|
|
|
| // |store| and |install_attributes| must remain valid for the life time of the
|
| // enrollment handler.
|
| @@ -76,10 +77,19 @@ class EnrollmentHandlerChromeOS : public CloudPolicyClient::Observer,
|
| const EnrollmentCallback& completion_callback);
|
| ~EnrollmentHandlerChromeOS() override;
|
|
|
| + // Checks license types available for enrollment and reports the result
|
| + // to |callback|.
|
| + void CheckAvailableLicenses(
|
| + const AvailableLicensesCallback& completion_callback);
|
| +
|
| // Starts the enrollment process and reports the result to
|
| // |completion_callback_|.
|
| void StartEnrollment();
|
|
|
| + // Starts the enrollment process using user-selected |license_type|
|
| + // and reports the result to |completion_callback_|.
|
| + void StartEnrollmentWithLicense(LicenseType license_type);
|
| +
|
| // Releases the client.
|
| std::unique_ptr<CloudPolicyClient> ReleaseClient();
|
|
|
| @@ -170,6 +180,11 @@ class EnrollmentHandlerChromeOS : public CloudPolicyClient::Observer,
|
| void HandleLockDeviceResult(
|
| chromeos::InstallAttributes::LockResult lock_result);
|
|
|
| + // Handles the available licenses request.
|
| + void HandleAvailableLicensesResult(
|
| + bool success,
|
| + const CloudPolicyClient::LicenseMap& license_map);
|
| +
|
| // Initiates storing DM token. For Active Directory devices only.
|
| void StartStoreDMToken();
|
|
|
| @@ -209,6 +224,9 @@ class EnrollmentHandlerChromeOS : public CloudPolicyClient::Observer,
|
| std::string client_id_;
|
| std::string requisition_;
|
| EnrollmentCallback completion_callback_;
|
| + AvailableLicensesCallback available_licenses_callback_;
|
| + enterprise_management::LicenseType::LicenseTypeEnum license_type_ =
|
| + enterprise_management::LicenseType::UNDEFINED;
|
|
|
| // The current state key provided by |state_keys_broker_|.
|
| std::string current_state_key_;
|
|
|