| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 void OnPolicyFetched(CloudPolicyClient* client) override; | 99 void OnPolicyFetched(CloudPolicyClient* client) override; |
| 100 void OnRegistrationStateChanged(CloudPolicyClient* client) override; | 100 void OnRegistrationStateChanged(CloudPolicyClient* client) override; |
| 101 void OnClientError(CloudPolicyClient* client) override; | 101 void OnClientError(CloudPolicyClient* client) override; |
| 102 | 102 |
| 103 // ComponentCloudPolicyService::Delegate: | 103 // ComponentCloudPolicyService::Delegate: |
| 104 void OnComponentCloudPolicyUpdated() override; | 104 void OnComponentCloudPolicyUpdated() override; |
| 105 | 105 |
| 106 // CloudPolicyManager: | 106 // CloudPolicyManager: |
| 107 void OnStoreLoaded(CloudPolicyStore* cloud_policy_store) override; | 107 void OnStoreLoaded(CloudPolicyStore* cloud_policy_store) override; |
| 108 | 108 |
| 109 protected: | |
| 110 // CloudPolicyManager: | |
| 111 void GetChromePolicy(PolicyMap* policy_map) override; | |
| 112 | |
| 113 private: | 109 private: |
| 114 // Fetches a policy token using the refresh token if available, or the | 110 // Fetches a policy token using the refresh token if available, or the |
| 115 // authentication context of the signin context, and calls back | 111 // authentication context of the signin context, and calls back |
| 116 // OnOAuth2PolicyTokenFetched when done. | 112 // OnOAuth2PolicyTokenFetched when done. |
| 117 void FetchPolicyOAuthToken(); | 113 void FetchPolicyOAuthToken(); |
| 118 | 114 |
| 119 // Called once the policy access token is available, and starts the | 115 // Called once the policy access token is available, and starts the |
| 120 // registration with the policy server if the token was successfully fetched. | 116 // registration with the policy server if the token was successfully fetched. |
| 121 void OnOAuth2PolicyTokenFetched(const std::string& policy_token, | 117 void OnOAuth2PolicyTokenFetched(const std::string& policy_token, |
| 122 const GoogleServiceAuthError& error); | 118 const GoogleServiceAuthError& error); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 base::Time time_init_completed_; | 179 base::Time time_init_completed_; |
| 184 base::Time time_token_available_; | 180 base::Time time_token_available_; |
| 185 base::Time time_client_registered_; | 181 base::Time time_client_registered_; |
| 186 | 182 |
| 187 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); | 183 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); |
| 188 }; | 184 }; |
| 189 | 185 |
| 190 } // namespace policy | 186 } // namespace policy |
| 191 | 187 |
| 192 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 188 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
| OLD | NEW |