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

Side by Side Diff: third_party/WebKit/Source/core/html/WebFeaturePolicyFeatureHash.h

Issue 2680083002: Initial Implementation of Iframe Attribute for Feature Policy (Part 1) (Closed)
Patch Set: Removed getAllowedFeatureNames() from HTMLIFrameElement Created 3 years, 10 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
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698