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 24 matching lines...) Expand all Loading... | |
35 const policy::EnrollmentConfig& enrollment_config, | 35 const policy::EnrollmentConfig& enrollment_config, |
36 const std::string& enrolling_user_domain); | 36 const std::string& enrolling_user_domain); |
37 ~EnterpriseEnrollmentHelperImpl() override; | 37 ~EnterpriseEnrollmentHelperImpl() override; |
38 | 38 |
39 // Overridden from EnterpriseEnrollmentHelper: | 39 // Overridden from EnterpriseEnrollmentHelper: |
40 void EnrollUsingProfile(Profile* profile, | 40 void EnrollUsingProfile(Profile* profile, |
41 bool fetch_additional_token) override; | 41 bool fetch_additional_token) override; |
42 void EnrollUsingAuthCode(const std::string& auth_code) override; | 42 void EnrollUsingAuthCode(const std::string& auth_code) override; |
43 void EnrollUsingToken(const std::string& token) override; | 43 void EnrollUsingToken(const std::string& token) override; |
44 void ClearAuth(const base::Closure& callback) override; | 44 void ClearAuth(const base::Closure& callback) override; |
45 void GetDeviceAttributeUpdatePermission() override; | |
46 void UpdateDeviceAttributes(const std::string& asset_id, | |
47 const std::string& location) override; | |
48 const std::string& GetOAuthToken() override; | |
dzhioev (left Google)
2015/04/14 15:48:19
This method is declared private in EnterpriseEnrol
Polina Bondarenko
2015/04/14 16:14:32
I didn't get a compilation error, anyway fixed.
| |
45 | 49 |
46 private: | 50 private: |
47 void DoEnrollUsingToken(const std::string& token); | 51 void DoEnrollUsingToken(const std::string& token); |
48 | 52 |
49 // Handles completion of the OAuth2 token fetch attempt. | 53 // Handles completion of the OAuth2 token fetch attempt. |
50 void OnTokenFetched(size_t fetcher_index, | 54 void OnTokenFetched(size_t fetcher_index, |
51 const std::string& token, | 55 const std::string& token, |
52 const GoogleServiceAuthError& error); | 56 const GoogleServiceAuthError& error); |
53 | 57 |
54 // Handles completion of the enrollment attempt. | 58 // Handles completion of the enrollment attempt. |
55 void OnEnrollmentFinished(policy::EnrollmentStatus status); | 59 void OnEnrollmentFinished(policy::EnrollmentStatus status); |
56 | 60 |
61 // Handles completion of the device attribute update permission request. | |
62 void OnDeviceAttributeUpdatePermission(bool status); | |
63 | |
64 // Handles completion of the device attribute update attempt. | |
65 void OnDeviceAttributeUploadCompleted(bool status); | |
66 | |
57 void ReportAuthStatus(const GoogleServiceAuthError& error); | 67 void ReportAuthStatus(const GoogleServiceAuthError& error); |
58 void ReportEnrollmentStatus(policy::EnrollmentStatus status); | 68 void ReportEnrollmentStatus(policy::EnrollmentStatus status); |
59 | 69 |
60 // Logs an UMA event in the kMetricEnrollment or the kMetricEnrollmentRecovery | 70 // Logs an UMA event in the kMetricEnrollment or the kMetricEnrollmentRecovery |
61 // histogram, depending on |enrollment_mode_|. | 71 // histogram, depending on |enrollment_mode_|. |
62 void UMA(policy::MetricEnrollment sample); | 72 void UMA(policy::MetricEnrollment sample); |
63 | 73 |
64 // Overridden from BrowsingDataRemover::Observer: | 74 // Overridden from BrowsingDataRemover::Observer: |
65 void OnBrowsingDataRemoverDone() override; | 75 void OnBrowsingDataRemoverDone() override; |
66 | 76 |
(...skipping 19 matching lines...) Expand all Loading... | |
86 ScopedVector<policy::PolicyOAuth2TokenFetcher> oauth_fetchers_; | 96 ScopedVector<policy::PolicyOAuth2TokenFetcher> oauth_fetchers_; |
87 | 97 |
88 base::WeakPtrFactory<EnterpriseEnrollmentHelperImpl> weak_ptr_factory_; | 98 base::WeakPtrFactory<EnterpriseEnrollmentHelperImpl> weak_ptr_factory_; |
89 | 99 |
90 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentHelperImpl); | 100 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentHelperImpl); |
91 }; | 101 }; |
92 | 102 |
93 } // namespace chromeos | 103 } // namespace chromeos |
94 | 104 |
95 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER _IMPL_H_ | 105 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER _IMPL_H_ |
OLD | NEW |