Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: chrome/browser/policy/cloud/component_cloud_policy_service.h

Issue 15061007: Added a PolicyDomainDescriptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments, rebase on new PolicySchema Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // this object. Only cached policies will be served until a |client| is 76 // this object. Only cached policies will be served until a |client| is
77 // connected. 77 // connected.
78 // |request_context| is used with the URLFetchers triggered by the updater. 78 // |request_context| is used with the URLFetchers triggered by the updater.
79 void Connect(CloudPolicyClient* client, 79 void Connect(CloudPolicyClient* client,
80 scoped_refptr<net::URLRequestContextGetter> request_context); 80 scoped_refptr<net::URLRequestContextGetter> request_context);
81 81
82 // Disconnects from the cloud policy service and stops trying to download 82 // Disconnects from the cloud policy service and stops trying to download
83 // remote policy data. 83 // remote policy data.
84 void Disconnect(); 84 void Disconnect();
85 85
86 // |component_ids| is the complete set of components to track for the given 86 // |descriptor| lists the complete set of components to track for its domain.
87 // |domain|. This purges unused components from the cache, and starts 87 // This purges unused components from the cache, and starts updating the
88 // updating the components in |component_ids|. 88 // components listed in the descriptor. It's only valid to call this for
89 // It's only valid to call this for domains that are supported, i.e. 89 // domains that are supported, i.e. SupportsDomain(domain) is true.
90 // SupportsDomain(domain) is true. 90 void RegisterPolicyDomain(
91 void RegisterPolicyDomain(PolicyDomain domain, 91 scoped_refptr<const PolicyDomainDescriptor> descriptor);
92 const std::set<std::string>& component_ids);
93 92
94 // CloudPolicyClient::Observer implementation: 93 // CloudPolicyClient::Observer implementation:
95 virtual void OnPolicyFetched(CloudPolicyClient* client) OVERRIDE; 94 virtual void OnPolicyFetched(CloudPolicyClient* client) OVERRIDE;
96 virtual void OnRegistrationStateChanged(CloudPolicyClient* client) OVERRIDE; 95 virtual void OnRegistrationStateChanged(CloudPolicyClient* client) OVERRIDE;
97 virtual void OnClientError(CloudPolicyClient* client) OVERRIDE; 96 virtual void OnClientError(CloudPolicyClient* client) OVERRIDE;
98 97
99 // CloudPolicyStore::Observer implementation: 98 // CloudPolicyStore::Observer implementation:
100 virtual void OnStoreLoaded(CloudPolicyStore* store) OVERRIDE; 99 virtual void OnStoreLoaded(CloudPolicyStore* store) OVERRIDE;
101 virtual void OnStoreError(CloudPolicyStore* store) OVERRIDE; 100 virtual void OnStoreError(CloudPolicyStore* store) OVERRIDE;
102 101
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 142
144 bool is_initialized_; 143 bool is_initialized_;
145 base::WeakPtrFactory<ComponentCloudPolicyService> weak_ptr_factory_; 144 base::WeakPtrFactory<ComponentCloudPolicyService> weak_ptr_factory_;
146 145
147 DISALLOW_COPY_AND_ASSIGN(ComponentCloudPolicyService); 146 DISALLOW_COPY_AND_ASSIGN(ComponentCloudPolicyService);
148 }; 147 };
149 148
150 } // namespace policy 149 } // namespace policy
151 150
152 #endif // CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ 151 #endif // CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698