Chromium Code Reviews| Index: chrome/browser/policy/policy_domain_descriptor.h |
| diff --git a/chrome/browser/policy/policy_domain_descriptor.h b/chrome/browser/policy/policy_domain_descriptor.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6748f0f3d1eef63a6a277cec42ced5ea1719232e |
| --- /dev/null |
| +++ b/chrome/browser/policy/policy_domain_descriptor.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_POLICY_POLICY_DOMAIN_DESCRIPTOR_H_ |
| +#define CHROME_BROWSER_POLICY_POLICY_DOMAIN_DESCRIPTOR_H_ |
| + |
| +#include <map> |
| +#include <string> |
| + |
| +#include "base/basictypes.h" |
| +#include "base/memory/ref_counted.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "chrome/browser/policy/policy_service.h" |
| + |
| +namespace policy { |
| + |
| +class PolicyBundle; |
| +class PolicySchema; |
| + |
| +class PolicyDomainDescriptor : public base::RefCounted<PolicyDomainDescriptor> { |
|
Mattias Nissler (ping if slow)
2013/05/15 10:24:06
This should have a class comment explaining what i
Joao da Silva
2013/05/19 13:17:55
I had that in some commit before uploading but los
|
| + public: |
| + typedef std::map<std::string, const PolicySchema*> SchemaMap; |
| + |
| + explicit PolicyDomainDescriptor(PolicyDomain domain); |
| + |
| + PolicyDomain domain() const { return domain_; } |
| + const SchemaMap& components() const { return schema_map_; } |
| + |
| + void AddComponent(const std::string& component_id, |
|
Mattias Nissler (ping if slow)
2013/05/15 10:24:06
Given the implementation, this should probably be
Joao da Silva
2013/05/19 13:17:55
Done.
bartfab (slow)
2013/05/21 12:14:19
I just noticed that my suggestion of |AddComponent
|
| + scoped_ptr<PolicySchema> schema); |
| + |
| + void FilterBundle(PolicyBundle* bundle) const; |
| + |
| + private: |
| + friend class base::RefCounted<PolicyDomainDescriptor>; |
| + ~PolicyDomainDescriptor(); |
| + |
| + PolicyDomain domain_; |
| + SchemaMap schema_map_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PolicyDomainDescriptor); |
| +}; |
| + |
| +} // namespace policy |
| + |
| +#endif // CHROME_BROWSER_POLICY_POLICY_DOMAIN_DESCRIPTOR_H_ |