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