| 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_ENTERPRISE_ENROLLMENT_HELPER_IM
PL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_IM
PL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_IM
PL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_IM
PL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 const policy::EnrollmentConfig& enrollment_config, | 31 const policy::EnrollmentConfig& enrollment_config, |
| 32 const std::string& enrolling_user_domain); | 32 const std::string& enrolling_user_domain); |
| 33 ~EnterpriseEnrollmentHelperImpl() override; | 33 ~EnterpriseEnrollmentHelperImpl() override; |
| 34 | 34 |
| 35 // Overridden from EnterpriseEnrollmentHelper: | 35 // Overridden from EnterpriseEnrollmentHelper: |
| 36 void EnrollUsingAuthCode(const std::string& auth_code, | 36 void EnrollUsingAuthCode(const std::string& auth_code, |
| 37 bool fetch_additional_token) override; | 37 bool fetch_additional_token) override; |
| 38 void EnrollUsingToken(const std::string& token) override; | 38 void EnrollUsingToken(const std::string& token) override; |
| 39 void EnrollUsingAttestation() override; | 39 void EnrollUsingAttestation() override; |
| 40 void ClearAuth(const base::Closure& callback) override; | 40 void ClearAuth(const base::Closure& callback) override; |
| 41 void UseLicenseType(policy::LicenseType type) override; |
| 41 void GetDeviceAttributeUpdatePermission() override; | 42 void GetDeviceAttributeUpdatePermission() override; |
| 42 void UpdateDeviceAttributes(const std::string& asset_id, | 43 void UpdateDeviceAttributes(const std::string& asset_id, |
| 43 const std::string& location) override; | 44 const std::string& location) override; |
| 44 | 45 |
| 45 private: | 46 private: |
| 46 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest, | 47 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest, |
| 47 TestProperPageGetsLoadedOnEnrollmentSuccess); | 48 TestProperPageGetsLoadedOnEnrollmentSuccess); |
| 48 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest, | 49 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest, |
| 49 TestAttributePromptPageGetsLoaded); | 50 TestAttributePromptPageGetsLoaded); |
| 50 | 51 |
| 51 void DoEnroll(const std::string& token); | 52 void DoEnroll(const std::string& token); |
| 52 | 53 |
| 53 // Handles completion of the OAuth2 token fetch attempt. | 54 // Handles completion of the OAuth2 token fetch attempt. |
| 54 void OnTokenFetched(bool is_additional_token, | 55 void OnTokenFetched(bool is_additional_token, |
| 55 const std::string& token, | 56 const std::string& token, |
| 56 const GoogleServiceAuthError& error); | 57 const GoogleServiceAuthError& error); |
| 57 | 58 |
| 59 // Handles multiple license types case. |
| 60 void OnMultipleLicensesAvailable(const EnrollmentLicenseMap& licenses); |
| 61 |
| 58 // Handles completion of the enrollment attempt. | 62 // Handles completion of the enrollment attempt. |
| 59 void OnEnrollmentFinished(policy::EnrollmentStatus status); | 63 void OnEnrollmentFinished(policy::EnrollmentStatus status); |
| 60 | 64 |
| 61 // Handles completion of the device attribute update permission request. | 65 // Handles completion of the device attribute update permission request. |
| 62 void OnDeviceAttributeUpdatePermission(bool granted); | 66 void OnDeviceAttributeUpdatePermission(bool granted); |
| 63 | 67 |
| 64 // Handles completion of the device attribute update attempt. | 68 // Handles completion of the device attribute update attempt. |
| 65 void OnDeviceAttributeUploadCompleted(bool success); | 69 void OnDeviceAttributeUploadCompleted(bool success); |
| 66 | 70 |
| 67 void ReportAuthStatus(const GoogleServiceAuthError& error); | 71 void ReportAuthStatus(const GoogleServiceAuthError& error); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 94 std::unique_ptr<policy::PolicyOAuth2TokenFetcher> oauth_fetcher_; | 98 std::unique_ptr<policy::PolicyOAuth2TokenFetcher> oauth_fetcher_; |
| 95 | 99 |
| 96 base::WeakPtrFactory<EnterpriseEnrollmentHelperImpl> weak_ptr_factory_; | 100 base::WeakPtrFactory<EnterpriseEnrollmentHelperImpl> weak_ptr_factory_; |
| 97 | 101 |
| 98 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentHelperImpl); | 102 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentHelperImpl); |
| 99 }; | 103 }; |
| 100 | 104 |
| 101 } // namespace chromeos | 105 } // namespace chromeos |
| 102 | 106 |
| 103 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER
_IMPL_H_ | 107 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER
_IMPL_H_ |
| OLD | NEW |