| Index: chrome/browser/policy/async_policy_loader.h
|
| diff --git a/chrome/browser/policy/async_policy_loader.h b/chrome/browser/policy/async_policy_loader.h
|
| index 61529e71b6e7d287c2d7e642fd75e92e2bce1f47..bd787bf5be77e62e11309d4c8d2c74fa3054392d 100644
|
| --- a/chrome/browser/policy/async_policy_loader.h
|
| +++ b/chrome/browser/policy/async_policy_loader.h
|
| @@ -5,14 +5,19 @@
|
| #ifndef CHROME_BROWSER_POLICY_ASYNC_POLICY_LOADER_H_
|
| #define CHROME_BROWSER_POLICY_ASYNC_POLICY_LOADER_H_
|
|
|
| +#include <map>
|
| +
|
| #include "base/callback.h"
|
| +#include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/time.h"
|
| +#include "chrome/browser/policy/policy_service.h"
|
|
|
| namespace policy {
|
|
|
| class PolicyBundle;
|
| +class PolicyDomainDescriptor;
|
|
|
| // Base implementation for platform-specific policy loaders. Together with the
|
| // AsyncPolicyProvider, this base implementation takes care of the initial load,
|
| @@ -52,6 +57,20 @@ class AsyncPolicyLoader {
|
| // makes sure the policies are reloaded if the update events aren't triggered.
|
| void Reload(bool force);
|
|
|
| + // Passes the current |descriptor| for a domain, which is used to determine
|
| + // which policy names are supported for each component.
|
| + void RegisterPolicyDomain(
|
| + scoped_refptr<const PolicyDomainDescriptor> descriptor);
|
| +
|
| + protected:
|
| + typedef std::map<PolicyDomain, scoped_refptr<const PolicyDomainDescriptor> >
|
| + DescriptorMap;
|
| +
|
| + // Returns the current DescriptorMap. This can be used by implementations to
|
| + // determine the components registered for each domain, and to filter out
|
| + // unknonwn policies.
|
| + const DescriptorMap& descriptor_map() const { return descriptor_map_; }
|
| +
|
| private:
|
| // Allow AsyncPolicyProvider to call Init().
|
| friend class AsyncPolicyProvider;
|
| @@ -90,6 +109,9 @@ class AsyncPolicyLoader {
|
| // non-local filesystem involved.
|
| base::Time last_modification_clock_;
|
|
|
| + // A map of the currently registered domains and their descriptors.
|
| + DescriptorMap descriptor_map_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AsyncPolicyLoader);
|
| };
|
|
|
|
|