Chromium Code Reviews| Index: components/safe_browsing_db/v4_protocol_manager_util.h |
| diff --git a/components/safe_browsing_db/v4_protocol_manager_util.h b/components/safe_browsing_db/v4_protocol_manager_util.h |
| index 467f60418d58946d4d484ecb5d542f2cca6a91a2..c0c69d277089807bfbcf0438a087a64961c9f7d6 100644 |
| --- a/components/safe_browsing_db/v4_protocol_manager_util.h |
| +++ b/components/safe_browsing_db/v4_protocol_manager_util.h |
| @@ -22,6 +22,13 @@ namespace net { |
| class HttpRequestHeaders; |
| } // namespace net |
| +struct EnumClassHash { |
| + template <typename T> |
| + std::size_t operator()(T t) const { |
| + return static_cast<std::size_t>(t); |
| + } |
| +}; |
| + |
| namespace safe_browsing { |
| // A hash prefix sent by the SafeBrowsing PVer4 service. |
| @@ -217,6 +224,10 @@ class V4ProtocolManagerUtil { |
| DISALLOW_COPY_AND_ASSIGN(V4ProtocolManagerUtil); |
| }; |
| +typedef base::hash_set<PlatformType, EnumClassHash> PlatformTypeSet; |
| +typedef base::hash_set<ThreatEntryType, EnumClassHash> ThreatEntryTypeSet; |
| +typedef base::hash_set<ThreatType, EnumClassHash> ThreatTypeSet; |
|
Scott Hess - ex-Googler
2016/08/23 20:25:46
These feel like more-expensive versions of std::bi
|
| + |
| } // namespace safe_browsing |
| namespace std { |