Ignore title parameter for navigator.registerProtocolHandler
[chromium-blink-merge.git] / components / policy / core / common / policy_namespace.h
blob86dc5866afc5f7b207080626ebd3c636fc401175
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_NAMESPACE_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_NAMESPACE_H_
8 #include <string>
9 #include <vector>
11 #include "components/policy/policy_export.h"
13 namespace policy {
15 // Policies are namespaced by a (PolicyDomain, ID) pair. The meaning of the ID
16 // string depends on the domain; for example, if the PolicyDomain is
17 // "extensions" then the ID identifies the extension that the policies control.
18 enum POLICY_EXPORT PolicyDomain {
19 // The component ID for chrome policies is always the empty string.
20 POLICY_DOMAIN_CHROME,
22 // The extensions policy domain is a work in progress. Included here for
23 // tests.
24 POLICY_DOMAIN_EXTENSIONS,
26 // Must be the last entry.
27 POLICY_DOMAIN_SIZE,
30 // Groups a policy domain and a component ID in a single object representing
31 // a policy namespace. Objects of this class can be used as keys in std::maps.
32 struct POLICY_EXPORT PolicyNamespace {
33 public:
34 PolicyNamespace();
35 PolicyNamespace(PolicyDomain domain, const std::string& component_id);
36 PolicyNamespace(const PolicyNamespace& other);
37 ~PolicyNamespace();
39 PolicyNamespace& operator=(const PolicyNamespace& other);
40 bool operator<(const PolicyNamespace& other) const;
41 bool operator==(const PolicyNamespace& other) const;
42 bool operator!=(const PolicyNamespace& other) const;
44 PolicyDomain domain;
45 std::string component_id;
48 typedef std::vector<PolicyNamespace> PolicyNamespaceList;
50 } // namespace policy
52 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_NAMESPACE_H_