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

Unified Diff: components/safe_browsing_db/util.cc

Issue 2233103002: Move full hash caching logic to v4_get_hash_protocol_manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unique_ptr for V4GetHasProtocolManager. Fix the lone failing unit test. Created 4 years, 3 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/util.cc
diff --git a/components/safe_browsing_db/util.cc b/components/safe_browsing_db/util.cc
index f86fc771b1a99fe6c9932713ebfa49e9b82a135f..737af8c9e4d294e2438f33d6d713e4aac92096ed 100644
--- a/components/safe_browsing_db/util.cc
+++ b/components/safe_browsing_db/util.cc
@@ -38,6 +38,16 @@ ThreatMetadata::ThreatMetadata(const ThreatMetadata& other) = default;
ThreatMetadata::~ThreatMetadata() {}
+bool ThreatMetadata::operator==(const ThreatMetadata& other) const {
+ return threat_pattern_type == other.threat_pattern_type &&
+ api_permissions == other.api_permissions &&
+ population_id == other.population_id;
+}
+
+bool ThreatMetadata::operator!=(const ThreatMetadata& other) const {
+ return !operator==(other);
+}
+
// SBCachedFullHashResult ------------------------------------------------------
SBCachedFullHashResult::SBCachedFullHashResult() {}

Powered by Google App Engine
This is Rietveld 408576698