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

Unified Diff: components/safe_browsing_db/v4_protocol_manager_util.h

Issue 2261603002: PVer4: Re-use the PVer3 implementation to get full hashes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@01_check_browse_url
Patch Set: BUILD: v4_local_database_manager depends on :v4_get_hash_protocol_manager Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
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 {

Powered by Google App Engine
This is Rietveld 408576698