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

Unified Diff: chrome/browser/safe_browsing/local_database_manager.cc

Issue 2890293004: Add the ability to check the CSD Whitelist asynchronously, for PhishGuard. (Closed)
Patch Set: Respond to vakhs review, fix up tests Created 3 years, 7 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: chrome/browser/safe_browsing/local_database_manager.cc
diff --git a/chrome/browser/safe_browsing/local_database_manager.cc b/chrome/browser/safe_browsing/local_database_manager.cc
index 12e93e48fcb292ef8f7cab2a73fdeec40facbd4b..99f3bbf804e7e765efc01993aeeb30e7b4f60df8 100644
--- a/chrome/browser/safe_browsing/local_database_manager.cc
+++ b/chrome/browser/safe_browsing/local_database_manager.cc
@@ -427,6 +427,14 @@ bool LocalSafeBrowsingDatabaseManager::MatchMalwareIP(
return database_->ContainsMalwareIP(ip_address);
}
+AsyncMatch LocalSafeBrowsingDatabaseManager::CheckCsdWhitelistUrl(
+ const GURL& url,
+ Client* Client) {
+ // Pver3 DB does not support actual partial-hash whitelists, so we emulate
+ // it. All this code will go away soon (~M62).
+ return (MatchCsdWhitelistUrl(url) ? AsyncMatch::MATCH : AsyncMatch::NO_MATCH);
+}
+
bool LocalSafeBrowsingDatabaseManager::MatchCsdWhitelistUrl(const GURL& url) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!enabled_ || !enable_csd_whitelist_ || !MakeDatabaseAvailable()) {

Powered by Google App Engine
This is Rietveld 408576698