Index: components/safe_browsing_db/v4_protocol_manager_util.cc |
diff --git a/components/safe_browsing_db/v4_protocol_manager_util.cc b/components/safe_browsing_db/v4_protocol_manager_util.cc |
index fde1c4aaaf6b710cdbcd8227a0df9a850e1c1b9b..225835129a284df3d8b9d44b0e627e49683c98ee 100644 |
--- a/components/safe_browsing_db/v4_protocol_manager_util.cc |
+++ b/components/safe_browsing_db/v4_protocol_manager_util.cc |
@@ -19,6 +19,13 @@ namespace safe_browsing { |
// The Safe Browsing V4 server URL prefix. |
const char kSbV4UrlPrefix[] = "https://safebrowsing.googleapis.com/v4"; |
+std::ostream& operator<<(std::ostream& os, const UpdateListIdentifier& id) { |
+ os << "hash: " << id.hash() << "; platform_type: " << id.platform_type |
+ << "; threat_entry_type: " << id.threat_entry_type |
+ << "; threat_type: " << id.threat_type; |
+ return os; |
+} |
+ |
bool UpdateListIdentifier::operator==(const UpdateListIdentifier& other) const { |
return platform_type == other.platform_type && |
threat_entry_type == other.threat_entry_type && |
@@ -38,6 +45,20 @@ size_t UpdateListIdentifier::hash() const { |
return base::HashInts(interim, third); |
} |
+UpdateListIdentifier::UpdateListIdentifier() {} |
+ |
+UpdateListIdentifier::UpdateListIdentifier(PlatformType platform_type, |
+ ThreatEntryType threat_entry_type, |
+ ThreatType threat_type) |
+ : platform_type(platform_type), |
+ threat_entry_type(threat_entry_type), |
+ threat_type(threat_type) {} |
+ |
+UpdateListIdentifier::UpdateListIdentifier(const ListUpdateResponse& response) |
+ : UpdateListIdentifier(response.platform_type(), |
+ response.threat_entry_type(), |
+ response.threat_type()) {} |
+ |
V4ProtocolConfig::V4ProtocolConfig() : disable_auto_update(false) {} |
V4ProtocolConfig::V4ProtocolConfig(const V4ProtocolConfig& other) = default; |