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

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

Issue 1221073004: Enable clang warning for ignored attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
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 COMPONENTS_POLICY_CORE_COMMON_POLICY_NAMESPACE_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_NAMESPACE_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_NAMESPACE_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_NAMESPACE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/containers/hash_tables.h" 13 #include "base/containers/hash_tables.h"
14 #include "components/policy/policy_export.h" 14 #include "components/policy/policy_export.h"
15 15
16 namespace policy { 16 namespace policy {
17 17
18 // Policies are namespaced by a (PolicyDomain, ID) pair. The meaning of the ID 18 // Policies are namespaced by a (PolicyDomain, ID) pair. The meaning of the ID
19 // string depends on the domain; for example, if the PolicyDomain is 19 // string depends on the domain; for example, if the PolicyDomain is
20 // "extensions" then the ID identifies the extension that the policies control. 20 // "extensions" then the ID identifies the extension that the policies control.
21 enum POLICY_EXPORT PolicyDomain { 21 enum PolicyDomain {
22 // The component ID for chrome policies is always the empty string. 22 // The component ID for chrome policies is always the empty string.
23 POLICY_DOMAIN_CHROME, 23 POLICY_DOMAIN_CHROME,
24 24
25 // The extensions policy domain is a work in progress. Included here for 25 // The extensions policy domain is a work in progress. Included here for
26 // tests. 26 // tests.
27 POLICY_DOMAIN_EXTENSIONS, 27 POLICY_DOMAIN_EXTENSIONS,
28 28
29 // Must be the last entry. 29 // Must be the last entry.
30 POLICY_DOMAIN_SIZE, 30 POLICY_DOMAIN_SIZE,
31 }; 31 };
(...skipping 28 matching lines...) Expand all
60 template <> 60 template <>
61 struct hash<policy::PolicyNamespace> { 61 struct hash<policy::PolicyNamespace> {
62 std::size_t operator()(const policy::PolicyNamespace& ns) const { 62 std::size_t operator()(const policy::PolicyNamespace& ns) const {
63 return hash<std::string>()(ns.component_id) ^ (UINT64_C(1) << ns.domain); 63 return hash<std::string>()(ns.component_id) ^ (UINT64_C(1) << ns.domain);
64 } 64 }
65 }; 65 };
66 66
67 } // namespace BASE_HASH_NAMESPACE 67 } // namespace BASE_HASH_NAMESPACE
68 68
69 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_NAMESPACE_H_ 69 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_NAMESPACE_H_
OLDNEW
« no previous file with comments | « components/login/base_screen_handler_utils.h ('k') | content/public/browser/presentation_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698