OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 WebFeaturePolicyFeatureHash_h |
| 6 #define WebFeaturePolicyFeatureHash_h |
| 7 |
| 8 #include "public/platform/WebFeaturePolicy.h" |
| 9 #include "wtf/HashSet.h" |
| 10 |
| 11 namespace WTF { |
| 12 |
| 13 template <> |
| 14 struct DefaultHash<blink::WebFeaturePolicyFeature> { |
| 15 STATIC_ONLY(DefaultHash); |
| 16 using Hash = IntHash<blink::WebFeaturePolicyFeature>; |
| 17 }; |
| 18 |
| 19 template <> |
| 20 struct HashTraits<blink::WebFeaturePolicyFeature> |
| 21 : GenericHashTraits<blink::WebFeaturePolicyFeature> { |
| 22 STATIC_ONLY(HashTraits); |
| 23 static bool isDeletedValue(const blink::WebFeaturePolicyFeature& value) { |
| 24 return value == static_cast<blink::WebFeaturePolicyFeature>(-1); |
| 25 } |
| 26 static void constructDeletedValue(blink::WebFeaturePolicyFeature& slot, |
| 27 bool) { |
| 28 slot = static_cast<blink::WebFeaturePolicyFeature>(-1); |
| 29 } |
| 30 }; |
| 31 |
| 32 } // namespace WTF |
| 33 |
| 34 #endif // WebFeaturePolicyFeatureHash_h |
OLD | NEW |