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

Unified Diff: components/policy/core/common/policy_namespace.h

Issue 2600783002: Remove base::ScopedPtrHashMap from components/policy/. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/policy/core/common/cloud/component_cloud_policy_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/policy_namespace.h
diff --git a/components/policy/core/common/policy_namespace.h b/components/policy/core/common/policy_namespace.h
index d3d70506fef0a951ea12966182da2bd7aa6a31b3..780fa22f9593f27f8c9103d45081c6064d7431f5 100644
--- a/components/policy/core/common/policy_namespace.h
+++ b/components/policy/core/common/policy_namespace.h
@@ -54,20 +54,13 @@ struct POLICY_EXPORT PolicyNamespace {
typedef std::vector<PolicyNamespace> PolicyNamespaceList;
-} // namespace policy
-
-// Define a custom std::hash for PolicyNamespace so that it can be used as
-// a key in hash_maps, and in particular in ScopedPtrHashMaps (which uses the
-// default std::hash).
-namespace BASE_HASH_NAMESPACE {
-
-template <>
-struct hash<policy::PolicyNamespace> {
- std::size_t operator()(const policy::PolicyNamespace& ns) const {
- return hash<std::string>()(ns.component_id) ^ (UINT64_C(1) << ns.domain);
+struct PolicyNamespaceHash {
+ size_t operator()(const policy::PolicyNamespace& ns) const {
+ return std::hash<std::string>()(ns.component_id) ^
+ (UINT64_C(1) << ns.domain);
}
};
-} // namespace BASE_HASH_NAMESPACE
+} // namespace policy
#endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_NAMESPACE_H_
« no previous file with comments | « components/policy/core/common/cloud/component_cloud_policy_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698