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

Unified Diff: chrome/browser/safe_browsing/local_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: chrome/browser/safe_browsing/local_database_manager.h
diff --git a/chrome/browser/safe_browsing/local_database_manager.h b/chrome/browser/safe_browsing/local_database_manager.h
index ef543e9c338b0f4b75342ce0443345caa53d3b07..c16350348e1e296c31619dc3c6ad506b6c606268 100644
--- a/chrome/browser/safe_browsing/local_database_manager.h
+++ b/chrome/browser/safe_browsing/local_database_manager.h
@@ -66,9 +66,13 @@ class LocalSafeBrowsingDatabaseManager
// Either |urls| or |full_hashes| is used to lookup database. |*_results|
// are parallel vectors containing the results. They are initialized to
// contain SB_THREAT_TYPE_SAFE.
+ // |url_hit_hash| and |url_metadata| are parallel vectors containing full
+ // hash and metadata of a database record provided the result. They are
+ // initialized to be empty strings.
std::vector<GURL> urls;
std::vector<SBThreatType> url_results;
std::vector<std::string> url_metadata;
+ std::vector<std::string> url_hit_hash;
std::vector<SBFullHash> full_hashes;
std::vector<SBThreatType> full_hash_results;
@@ -115,6 +119,7 @@ class LocalSafeBrowsingDatabaseManager
Client* client) override;
bool CheckExtensionIDs(const std::set<std::string>& extension_ids,
Client* client) override;
+ bool CheckResourceUrl(const GURL& url, Client* client) override;
bool MatchCsdWhitelistUrl(const GURL& url) override;
bool MatchMalwareIP(const std::string& ip_address) override;
bool MatchDownloadWhitelistUrl(const GURL& url) override;
@@ -286,6 +291,10 @@ class LocalSafeBrowsingDatabaseManager
std::vector<SBPrefix> CheckExtensionIDsOnSBThread(
const std::vector<SBPrefix>& prefixes);
+ // Checks all resource URL hashes on |safe_browsing_task_runner_|.
+ std::vector<SBPrefix> CheckResourceUrlOnSBThread(
+ const std::vector<SBPrefix>& prefixes);
+
// Helper function that calls safe browsing client and cleans up |checks_|.
void SafeBrowsingCheckDone(SafeBrowsingCheck* check);
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/local_database_manager.cc » ('j') | components/safe_browsing_db/util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698