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

Unified Diff: chrome/browser/policy/policy_service.h

Issue 15061007: Added a PolicyDomainDescriptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/policy/policy_prefs_browsertest.cc ('k') | chrome/browser/policy/policy_service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/policy_service.h
diff --git a/chrome/browser/policy/policy_service.h b/chrome/browser/policy/policy_service.h
index 4098bba463b1ab5dc5554eba0d6e3b50b1db7b69..8eee78812570b1b40610736be93bbe120781da2c 100644
--- a/chrome/browser/policy/policy_service.h
+++ b/chrome/browser/policy/policy_service.h
@@ -6,16 +6,17 @@
#define CHROME_BROWSER_POLICY_POLICY_SERVICE_H_
#include <map>
-#include <set>
#include <string>
-#include <utility>
#include "base/basictypes.h"
#include "base/callback.h"
+#include "base/memory/ref_counted.h"
#include "chrome/browser/policy/policy_map.h"
namespace policy {
+class PolicyDomainDescriptor;
+
// Policies are namespaced by a (PolicyDomain, ID) pair. The meaning of the ID
// string depends on the domain; for example, if the PolicyDomain is
// "extensions" then the ID identifies the extension that the policies control.
@@ -85,15 +86,15 @@ class PolicyService {
virtual void RemoveObserver(PolicyDomain domain, Observer* observer) = 0;
- // Registers the current components of the given policy |domain|, signaling
- // that there is interest in receiving policy for them.
- // |component_ids| is the current set of components for that |domain|, and
- // replaces any previously registered set.
- // The policy providers will try to load policy for these components, and may
- // flush cached data for components that aren't registered anymore.
+ // Registers the |descriptor| of a policy domain, indicated by
+ // |descriptor->domain()|. This overrides the descriptor previously set, if
+ // there was one.
+ // This registration signals that there is interest in receiving policy for
+ // the components listed in the descriptor. The policy providers will try to
+ // load policy for these components, and validate it against the descriptor.
+ // Cached data for components that aren't registered anymore may be dropped.
virtual void RegisterPolicyDomain(
- PolicyDomain domain,
- const std::set<std::string>& component_ids) = 0;
+ scoped_refptr<const PolicyDomainDescriptor> descriptor) = 0;
virtual const PolicyMap& GetPolicies(const PolicyNamespace& ns) const = 0;
« no previous file with comments | « chrome/browser/policy/policy_prefs_browsertest.cc ('k') | chrome/browser/policy/policy_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698