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" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/prefs/pref_member.h" | 14 #include "base/prefs/pref_member.h" |
15 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | |
16 #include "components/policy/core/common/cloud/cloud_policy_core.h" | 15 #include "components/policy/core/common/cloud/cloud_policy_core.h" |
17 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 16 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
18 #include "components/policy/core/common/cloud/component_cloud_policy_service.h" | 17 #include "components/policy/core/common/cloud/component_cloud_policy_service.h" |
19 #include "components/policy/core/common/configuration_policy_provider.h" | 18 #include "components/policy/core/common/configuration_policy_provider.h" |
20 #include "components/policy/policy_export.h" | 19 #include "components/policy/policy_export.h" |
21 | 20 |
22 namespace base { | 21 namespace base { |
23 class FilePath; | 22 class FilePath; |
24 class SequencedTaskRunner; | 23 class SequencedTaskRunner; |
25 } | 24 } |
(...skipping 17 matching lines...) Expand all Loading... |
43 : public ConfigurationPolicyProvider, | 42 : public ConfigurationPolicyProvider, |
44 public CloudPolicyStore::Observer, | 43 public CloudPolicyStore::Observer, |
45 public ComponentCloudPolicyService::Delegate { | 44 public ComponentCloudPolicyService::Delegate { |
46 public: | 45 public: |
47 // |task_runner| is the runner for policy refresh tasks. | 46 // |task_runner| is the runner for policy refresh tasks. |
48 // |file_task_runner| is used for file operations. Currently this must be the | 47 // |file_task_runner| is used for file operations. Currently this must be the |
49 // FILE BrowserThread. | 48 // FILE BrowserThread. |
50 // |io_task_runner| is used for network IO. Currently this must be the IO | 49 // |io_task_runner| is used for network IO. Currently this must be the IO |
51 // BrowserThread. | 50 // BrowserThread. |
52 CloudPolicyManager( | 51 CloudPolicyManager( |
53 const PolicyNamespaceKey& policy_ns_key, | 52 const std::string& policy_type, |
| 53 const std::string& settings_entity_id, |
54 CloudPolicyStore* cloud_policy_store, | 54 CloudPolicyStore* cloud_policy_store, |
55 const scoped_refptr<base::SequencedTaskRunner>& task_runner, | 55 const scoped_refptr<base::SequencedTaskRunner>& task_runner, |
56 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner, | 56 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner, |
57 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); | 57 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner); |
58 ~CloudPolicyManager() override; | 58 ~CloudPolicyManager() override; |
59 | 59 |
60 CloudPolicyCore* core() { return &core_; } | 60 CloudPolicyCore* core() { return &core_; } |
61 const CloudPolicyCore* core() const { return &core_; } | 61 const CloudPolicyCore* core() const { return &core_; } |
62 | 62 |
63 // ConfigurationPolicyProvider: | 63 // ConfigurationPolicyProvider: |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; | 113 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; |
114 scoped_refptr<base::SequencedTaskRunner> io_task_runner_; | 114 scoped_refptr<base::SequencedTaskRunner> io_task_runner_; |
115 | 115 |
116 DISALLOW_COPY_AND_ASSIGN(CloudPolicyManager); | 116 DISALLOW_COPY_AND_ASSIGN(CloudPolicyManager); |
117 }; | 117 }; |
118 | 118 |
119 } // namespace policy | 119 } // namespace policy |
120 | 120 |
121 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_MANAGER_H_ | 121 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_MANAGER_H_ |
OLD | NEW |