OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ |
6 #define CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ | 6 #define CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // |domain|. This purges unused components from the cache, and starts | 87 // |domain|. This purges unused components from the cache, and starts |
88 // updating the components in |component_ids|. | 88 // updating the components in |component_ids|. |
89 // It's only valid to call this for domains that are supported, i.e. | 89 // It's only valid to call this for domains that are supported, i.e. |
90 // SupportsDomain(domain) is true. | 90 // SupportsDomain(domain) is true. |
91 void RegisterPolicyDomain(PolicyDomain domain, | 91 void RegisterPolicyDomain(PolicyDomain domain, |
92 const std::set<std::string>& component_ids); | 92 const std::set<std::string>& component_ids); |
93 | 93 |
94 // CloudPolicyClient::Observer implementation: | 94 // CloudPolicyClient::Observer implementation: |
95 virtual void OnPolicyFetched(CloudPolicyClient* client) OVERRIDE; | 95 virtual void OnPolicyFetched(CloudPolicyClient* client) OVERRIDE; |
96 virtual void OnRegistrationStateChanged(CloudPolicyClient* client) OVERRIDE; | 96 virtual void OnRegistrationStateChanged(CloudPolicyClient* client) OVERRIDE; |
| 97 virtual void OnRobotAuthCodesFetched(CloudPolicyClient* client) OVERRIDE; |
97 virtual void OnClientError(CloudPolicyClient* client) OVERRIDE; | 98 virtual void OnClientError(CloudPolicyClient* client) OVERRIDE; |
98 | 99 |
99 // CloudPolicyStore::Observer implementation: | 100 // CloudPolicyStore::Observer implementation: |
100 virtual void OnStoreLoaded(CloudPolicyStore* store) OVERRIDE; | 101 virtual void OnStoreLoaded(CloudPolicyStore* store) OVERRIDE; |
101 virtual void OnStoreError(CloudPolicyStore* store) OVERRIDE; | 102 virtual void OnStoreError(CloudPolicyStore* store) OVERRIDE; |
102 | 103 |
103 private: | 104 private: |
104 class Backend; | 105 class Backend; |
105 typedef std::set<std::string> StringSet; | 106 typedef std::set<std::string> StringSet; |
106 typedef std::map<PolicyDomain, StringSet> ComponentMap; | 107 typedef std::map<PolicyDomain, StringSet> ComponentMap; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 144 |
144 bool is_initialized_; | 145 bool is_initialized_; |
145 base::WeakPtrFactory<ComponentCloudPolicyService> weak_ptr_factory_; | 146 base::WeakPtrFactory<ComponentCloudPolicyService> weak_ptr_factory_; |
146 | 147 |
147 DISALLOW_COPY_AND_ASSIGN(ComponentCloudPolicyService); | 148 DISALLOW_COPY_AND_ASSIGN(ComponentCloudPolicyService); |
148 }; | 149 }; |
149 | 150 |
150 } // namespace policy | 151 } // namespace policy |
151 | 152 |
152 #endif // CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ | 153 #endif // CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ |
OLD | NEW |