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

Unified Diff: components/safe_browsing_db/database_manager.h

Issue 1673733002: Support new Safe Browsing list "goog-badresource-shavar" in SafeBrowsingDatabase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Post-merge test fix Created 4 years, 10 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/database_manager.h
diff --git a/components/safe_browsing_db/database_manager.h b/components/safe_browsing_db/database_manager.h
index 8167b3ae1884910fb60ff1ada3c769bf44b047c4..fd8a276f5156db5a8345191b971d731314551071 100644
--- a/components/safe_browsing_db/database_manager.h
+++ b/components/safe_browsing_db/database_manager.h
@@ -49,6 +49,11 @@ class SafeBrowsingDatabaseManager
// Called when the result of checking the API blacklist is known.
virtual void OnCheckApiBlacklistUrlResult(const GURL& url,
const std::string& metadata) {}
+
+ // Called when the result of checking the resource blacklist is known.
+ virtual void OnCheckResourceUrlResult(const GURL& url,
+ SBThreatType threat_type,
+ const std::string& threat_hash) {}
};
@@ -90,6 +95,11 @@ class SafeBrowsingDatabaseManager
virtual bool CheckExtensionIDs(const std::set<std::string>& extension_ids,
Client* client) = 0;
+ // Check if |url| is in the resources blacklist. Returns true if not, false
+ // if further checks need to be made in which case the result will be passed
+ // to callback in |client|.
+ virtual bool CheckResourceUrl(const GURL& url, Client* client) = 0;
+
// Check if the |url| matches any of the full-length hashes from the client-
// side phishing detection whitelist. Returns true if there was a match and
// false otherwise. To make sure we are conservative we will return true if

Powered by Google App Engine
This is Rietveld 408576698