| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void OnPolicyFetched(CloudPolicyClient* client) override; | 98 void OnPolicyFetched(CloudPolicyClient* client) override; |
| 99 void OnRegistrationStateChanged(CloudPolicyClient* client) override; | 99 void OnRegistrationStateChanged(CloudPolicyClient* client) override; |
| 100 void OnClientError(CloudPolicyClient* client) override; | 100 void OnClientError(CloudPolicyClient* client) override; |
| 101 | 101 |
| 102 // ComponentCloudPolicyService::Delegate: | 102 // ComponentCloudPolicyService::Delegate: |
| 103 void OnComponentCloudPolicyUpdated() override; | 103 void OnComponentCloudPolicyUpdated() override; |
| 104 | 104 |
| 105 // CloudPolicyManager: | 105 // CloudPolicyManager: |
| 106 void OnStoreLoaded(CloudPolicyStore* cloud_policy_store) override; | 106 void OnStoreLoaded(CloudPolicyStore* cloud_policy_store) override; |
| 107 | 107 |
| 108 // Helper function to force a policy fetch timeout. |
| 109 void ForceTimeoutForTest(); |
| 110 |
| 108 protected: | 111 protected: |
| 109 // CloudPolicyManager: | 112 // CloudPolicyManager: |
| 110 void GetChromePolicy(PolicyMap* policy_map) override; | 113 void GetChromePolicy(PolicyMap* policy_map) override; |
| 111 | 114 |
| 112 private: | 115 private: |
| 113 // Fetches a policy token using the refresh token if available, or the | 116 // Fetches a policy token using the refresh token if available, or the |
| 114 // authentication context of the signin context, and calls back | 117 // authentication context of the signin context, and calls back |
| 115 // OnOAuth2PolicyTokenFetched when done. | 118 // OnOAuth2PolicyTokenFetched when done. |
| 116 void FetchPolicyOAuthToken(); | 119 void FetchPolicyOAuthToken(); |
| 117 | 120 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 base::Time time_init_completed_; | 185 base::Time time_init_completed_; |
| 183 base::Time time_token_available_; | 186 base::Time time_token_available_; |
| 184 base::Time time_client_registered_; | 187 base::Time time_client_registered_; |
| 185 | 188 |
| 186 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); | 189 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); |
| 187 }; | 190 }; |
| 188 | 191 |
| 189 } // namespace policy | 192 } // namespace policy |
| 190 | 193 |
| 191 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 194 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
| OLD | NEW |