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

Unified Diff: chrome/browser/safe_browsing/database_manager.h

Issue 586793003: Safebrowsing: Honor the metadata from malware fullhash results in SB API 3.0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes for sky Created 6 years, 3 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
« no previous file with comments | « chrome/browser/safe_browsing/BUILD.gn ('k') | chrome/browser/safe_browsing/database_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/database_manager.h
diff --git a/chrome/browser/safe_browsing/database_manager.h b/chrome/browser/safe_browsing/database_manager.h
index 98e225f283adcbcb01faa4e8fa23d470a4e0964a..c14addfe889c74c9f38de9d76e67ffaf62007adb 100644
--- a/chrome/browser/safe_browsing/database_manager.h
+++ b/chrome/browser/safe_browsing/database_manager.h
@@ -67,6 +67,7 @@ class SafeBrowsingDatabaseManager
// contain SB_THREAT_TYPE_SAFE.
std::vector<GURL> urls;
std::vector<SBThreatType> url_results;
+ std::vector<std::string> url_metadata;
std::vector<SBFullHash> full_hashes;
std::vector<SBThreatType> full_hash_results;
@@ -100,7 +101,8 @@ class SafeBrowsingDatabaseManager
// Called when the result of checking a browse URL is known.
virtual void OnCheckBrowseUrlResult(const GURL& url,
- SBThreatType threat_type) {}
+ SBThreatType threat_type,
+ const std::string& metadata) {}
// Called when the result of checking a download URL is known.
virtual void OnCheckDownloadUrlResult(const std::vector<GURL>& url_chain,
@@ -246,7 +248,8 @@ class SafeBrowsingDatabaseManager
// |full_hashes|, or SAFE if none match.
static SBThreatType GetUrlThreatType(
const GURL& url,
- const std::vector<SBFullHashResult>& full_hashes);
+ const std::vector<SBFullHashResult>& full_hashes,
+ size_t* index);
// Called to stop operations on the io_thread. This may be called multiple
// times during the life of the DatabaseManager. Should be called on IO
« no previous file with comments | « chrome/browser/safe_browsing/BUILD.gn ('k') | chrome/browser/safe_browsing/database_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698