| Index: third_party/WebKit/Source/core/html/WebFeaturePolicyFeatureHash.h
|
| diff --git a/third_party/WebKit/Source/core/html/WebFeaturePolicyFeatureHash.h b/third_party/WebKit/Source/core/html/WebFeaturePolicyFeatureHash.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a993a322f563a2a864281cdc180db010c3217a68
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/html/WebFeaturePolicyFeatureHash.h
|
| @@ -0,0 +1,34 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef WebFeaturePolicyFeatureHash_h
|
| +#define WebFeaturePolicyFeatureHash_h
|
| +
|
| +#include "public/platform/WebFeaturePolicy.h"
|
| +#include "wtf/HashSet.h"
|
| +
|
| +namespace WTF {
|
| +
|
| +template <>
|
| +struct DefaultHash<blink::WebFeaturePolicyFeature> {
|
| + STATIC_ONLY(DefaultHash);
|
| + using Hash = IntHash<blink::WebFeaturePolicyFeature>;
|
| +};
|
| +
|
| +template <>
|
| +struct HashTraits<blink::WebFeaturePolicyFeature>
|
| + : GenericHashTraits<blink::WebFeaturePolicyFeature> {
|
| + STATIC_ONLY(HashTraits);
|
| + static bool isDeletedValue(const blink::WebFeaturePolicyFeature& value) {
|
| + return value == static_cast<blink::WebFeaturePolicyFeature>(-1);
|
| + }
|
| + static void constructDeletedValue(blink::WebFeaturePolicyFeature& slot,
|
| + bool) {
|
| + slot = static_cast<blink::WebFeaturePolicyFeature>(-1);
|
| + }
|
| +};
|
| +
|
| +} // namespace WTF
|
| +
|
| +#endif // WebFeaturePolicyFeatureHash_h
|
|
|