diff options
author | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-05 01:44:33 +0000 |
---|---|---|
committer | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-05 01:44:33 +0000 |
commit | 200abc3b412aa5129bca6c90cfe298b05ad547b2 (patch) | |
tree | e6ee185054384e5d70328de700bcedabef43920c /chrome/browser/safe_browsing/safe_browsing_service.h | |
parent | 99f367cc966bff34742038d12580b8bad30b1ee0 (diff) | |
download | chromium_src-200abc3b412aa5129bca6c90cfe298b05ad547b2.zip chromium_src-200abc3b412aa5129bca6c90cfe298b05ad547b2.tar.gz chromium_src-200abc3b412aa5129bca6c90cfe298b05ad547b2.tar.bz2 |
Cache empty responses from the SafeBrowsing servers for GetHash
requests so that we don't keep asking for full hashes that don't
exist. We flush this cache with each update, which is a little
aggressive, but on the safe side.
BUG=1358225
Review URL: http://codereview.chromium.org/454
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_service.h')
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_service.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h index fe7d0e7..6f10b81 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.h +++ b/chrome/browser/safe_browsing/safe_browsing_service.h @@ -117,7 +117,8 @@ class SafeBrowsingService // SafeBrowsing storage system. void HandleGetHashResults( SafeBrowsingCheck* check, - const std::vector<SBFullHashResult>& full_hashes); + const std::vector<SBFullHashResult>& full_hashes, + bool can_cache); void HandleChunk(const std::string& list, std::deque<SBChunk>* chunks); void HandleChunkDelete(std::vector<SBChunkDelete>* chunk_deletes); void GetAllChunks(); @@ -198,7 +199,8 @@ class SafeBrowsingService void OnResetComplete(); // Store the results of a GetHash request. Runs on the database thread. - void CacheHashResults(const std::vector<SBFullHashResult>& full_hashes); + void CacheHashResults(const std::vector<SBPrefix>& prefixes, + const std::vector<SBFullHashResult>& full_hashes); // Internal worker function for processing full hashes. void OnHandleGetHashResults(SafeBrowsingCheck* check, |