return !memcmp(a.full_hash, b.full_hash, sizeof(a.full_hash));
}
+inline bool SBFullHashLess(const SBFullHash& a, const SBFullHash& b) {
+ return memcmp(a.full_hash, b.full_hash, sizeof(a.full_hash)) < 0;
+}
+
// Generate full hash for the given string.
SBFullHash SBFullHashForString(const base::StringPiece& str);
// Used when we get a gethash response.
struct SBFullHashResult {
SBFullHash hash;
- std::string list_name;
- int add_chunk_id;
+ // TODO(shess): Refactor to allow ListType here.
+ int list_id;
};
// Contains information about a list in the database.
int GetUrlHashIndex(const GURL& url,
const std::vector<SBFullHashResult>& full_hashes);
-bool IsPhishingList(const std::string& list_name);
-bool IsMalwareList(const std::string& list_name);
-bool IsBadbinurlList(const std::string& list_name);
-bool IsExtensionList(const std::string& list_name);
-
GURL GeneratePhishingReportUrl(const std::string& report_page,
const std::string& url_to_report,
bool is_client_side_detection);