Chromium Code Reviews| 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 fd9712ba935e37c89ad8d05d0b901034906ce964..ef4e2c22de19bd007b5585eae26ffab8a4a39933 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; |
|
Nathan Parker
2016/02/16 21:42:00
Why is this needed?
veranika
2016/02/17 15:37:54
In the resource request incident report we don't r
|
| 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; |
| @@ -285,6 +290,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); |
| @@ -344,6 +353,9 @@ class LocalSafeBrowsingDatabaseManager |
| // Indicate if the unwanted software blacklist should be enabled. |
| bool enable_unwanted_software_blacklist_; |
| + // Indicate if the resources blacklist should be enabled. |
| + bool enable_resource_blacklist_; |
|
Nathan Parker
2016/02/16 21:42:00
Do you need this? If you want a flag or a finch c
veranika
2016/02/17 15:37:54
Probably I don't. I added it here mostly to be uni
|
| + |
| // The sequenced task runner for running safe browsing database operations. |
| scoped_refptr<base::SequencedTaskRunner> safe_browsing_task_runner_; |