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

Side by Side Diff: components/policy/core/common/schema_map.h

Issue 78453005: Move PolicySchema and PolicySchemaRegistry to components/policy/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « components/policy.gypi ('k') | components/policy/core/common/schema_map.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_SCHEMA_MAP_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_SCHEMA_MAP_H_
6 #define CHROME_BROWSER_POLICY_SCHEMA_MAP_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_SCHEMA_MAP_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "components/policy/core/common/policy_namespace.h" 13 #include "components/policy/core/common/policy_namespace.h"
14 #include "components/policy/core/common/schema.h" 14 #include "components/policy/core/common/schema.h"
15 15
16 namespace policy { 16 namespace policy {
17 17
18 class PolicyBundle; 18 class PolicyBundle;
19 19
20 typedef std::map<std::string, Schema> ComponentMap; 20 typedef std::map<std::string, Schema> ComponentMap;
21 typedef std::map<PolicyDomain, ComponentMap> DomainMap; 21 typedef std::map<PolicyDomain, ComponentMap> DomainMap;
22 22
23 // Contains a mapping of policy namespaces (domain + component ID) to its 23 // Contains a mapping of policy namespaces (domain + component ID) to its
24 // corresponding Schema. 24 // corresponding Schema.
25 class SchemaMap : public base::RefCountedThreadSafe<SchemaMap> { 25 class POLICY_EXPORT SchemaMap : public base::RefCountedThreadSafe<SchemaMap> {
jochen (gone - plz use gerrit) 2013/11/21 13:45:48 should you include policy_export.h?
dconnelly 2013/11/22 13:18:47 Done.
26 public: 26 public:
27 SchemaMap(); 27 SchemaMap();
28 // Takes ownership of |map| (its contents will be swapped). 28 // Takes ownership of |map| (its contents will be swapped).
29 explicit SchemaMap(DomainMap& map); 29 explicit SchemaMap(DomainMap& map);
30 30
31 const DomainMap& GetDomains() const; 31 const DomainMap& GetDomains() const;
32 32
33 const ComponentMap* GetComponents(PolicyDomain domain) const; 33 const ComponentMap* GetComponents(PolicyDomain domain) const;
34 34
35 const Schema* GetSchema(const PolicyNamespace& ns) const; 35 const Schema* GetSchema(const PolicyNamespace& ns) const;
(...skipping 18 matching lines...) Expand all
54 54
55 ~SchemaMap(); 55 ~SchemaMap();
56 56
57 DomainMap map_; 57 DomainMap map_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(SchemaMap); 59 DISALLOW_COPY_AND_ASSIGN(SchemaMap);
60 }; 60 };
61 61
62 } // namespace policy 62 } // namespace policy
63 63
64 #endif // CHROME_BROWSER_POLICY_SCHEMA_MAP_H_ 64 #endif // COMPONENTS_POLICY_CORE_COMMON_SCHEMA_MAP_H_
OLDNEW
« no previous file with comments | « components/policy.gypi ('k') | components/policy/core/common/schema_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698