Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / safe_browsing / safe_browsing_util.h
index 783369e..f2f2d0e 100644 (file)
@@ -40,6 +40,10 @@ inline bool SBFullHashEqual(const SBFullHash& a, const SBFullHash& b) {
   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);
 
@@ -105,8 +109,8 @@ class SBChunkList {
 // 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.
@@ -353,11 +357,6 @@ int GetHashIndex(const SBFullHash& hash,
 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);