| 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 COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_MANAGER_H_ | 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_MANAGER_H_ |
| 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_MANAGER_H_ | 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // Check whether fully initialized and if so, publish policy by calling | 77 // Check whether fully initialized and if so, publish policy by calling |
| 78 // ConfigurationPolicyStore::UpdatePolicy(). | 78 // ConfigurationPolicyStore::UpdatePolicy(). |
| 79 void CheckAndPublishPolicy(); | 79 void CheckAndPublishPolicy(); |
| 80 | 80 |
| 81 // Writes Chrome policy into |policy_map|. This is intended to be overridden | 81 // Writes Chrome policy into |policy_map|. This is intended to be overridden |
| 82 // by subclasses that want to post-process policy before publishing it. The | 82 // by subclasses that want to post-process policy before publishing it. The |
| 83 // default implementation just copies over |store()->policy_map()|. | 83 // default implementation just copies over |store()->policy_map()|. |
| 84 virtual void GetChromePolicy(PolicyMap* policy_map); | 84 virtual void GetChromePolicy(PolicyMap* policy_map); |
| 85 | 85 |
| 86 void CreateComponentCloudPolicyService( | 86 void CreateComponentCloudPolicyService( |
| 87 const std::string& policy_type, |
| 87 const base::FilePath& policy_cache_path, | 88 const base::FilePath& policy_cache_path, |
| 88 const scoped_refptr<net::URLRequestContextGetter>& request_context, | 89 const scoped_refptr<net::URLRequestContextGetter>& request_context, |
| 89 CloudPolicyClient* client); | 90 CloudPolicyClient* client); |
| 90 | 91 |
| 91 void ClearAndDestroyComponentCloudPolicyService(); | 92 void ClearAndDestroyComponentCloudPolicyService(); |
| 92 | 93 |
| 93 // Convenience accessors to core() components. | 94 // Convenience accessors to core() components. |
| 94 CloudPolicyClient* client() { return core_.client(); } | 95 CloudPolicyClient* client() { return core_.client(); } |
| 95 const CloudPolicyClient* client() const { return core_.client(); } | 96 const CloudPolicyClient* client() const { return core_.client(); } |
| 96 CloudPolicyStore* store() { return core_.store(); } | 97 CloudPolicyStore* store() { return core_.store(); } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 114 | 115 |
| 115 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; | 116 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; |
| 116 scoped_refptr<base::SequencedTaskRunner> io_task_runner_; | 117 scoped_refptr<base::SequencedTaskRunner> io_task_runner_; |
| 117 | 118 |
| 118 DISALLOW_COPY_AND_ASSIGN(CloudPolicyManager); | 119 DISALLOW_COPY_AND_ASSIGN(CloudPolicyManager); |
| 119 }; | 120 }; |
| 120 | 121 |
| 121 } // namespace policy | 122 } // namespace policy |
| 122 | 123 |
| 123 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_MANAGER_H_ | 124 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_MANAGER_H_ |
| OLD | NEW |