OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
iclelland
2017/02/08 15:06:24
2017 here, too
lunalu1
2017/02/08 19:50:30
Done.
| |
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 : UnsignedWithZeroKeyHashTraits<blink::WebFeaturePolicyFeature> { | |
iclelland
2017/02/08 15:06:24
I think you could use a GenericHashTraits here, si
lunalu1
2017/02/08 19:50:30
Done.
| |
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 |