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

Side by Side Diff: chrome/browser/policy/policy_namespace.h

Issue 16254003: WIP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_POLICY_POLICY_NAMESPACE_H_
6 #define CHROME_BROWSER_POLICY_POLICY_NAMESPACE_H_
7
8 #include <string>
9
10 namespace policy {
11
12 // Policies are namespaced by a (PolicyDomain, ID) pair. The meaning of the ID
13 // string depends on the domain; for example, if the PolicyDomain is
14 // "extensions" then the ID identifies the extension that the policies control.
15 enum PolicyDomain {
16 // The component ID for chrome policies is always the empty string.
17 POLICY_DOMAIN_CHROME,
18
19 // The extensions policy domain is a work in progress. Included here for
20 // tests.
21 POLICY_DOMAIN_EXTENSIONS,
22
23 // Must be the last entry.
24 POLICY_DOMAIN_SIZE,
25 };
26
27 // Groups a policy domain and a component ID in a single object representing
28 // a policy namespace. Objects of this class can be used as keys in std::maps.
29 struct PolicyNamespace {
30 public:
31 PolicyNamespace();
32 PolicyNamespace(PolicyDomain domain, const std::string& component_id);
33 PolicyNamespace(const PolicyNamespace& other);
34 ~PolicyNamespace();
35
36 PolicyNamespace& operator=(const PolicyNamespace& other);
37 bool operator<(const PolicyNamespace& other) const;
38 bool operator==(const PolicyNamespace& other) const;
39 bool operator!=(const PolicyNamespace& other) const;
40
41 PolicyDomain domain;
42 std::string component_id;
43 };
44
45 } // namespace policy
46
47 #endif // CHROME_BROWSER_POLICY_POLICY_NAMESPACE_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_loader_win_unittest.cc ('k') | chrome/browser/policy/policy_namespace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698