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

Unified Diff: components/safe_browsing_db/database_manager.h

Issue 2233103002: Move full hash caching logic to v4_get_hash_protocol_manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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: components/safe_browsing_db/database_manager.h
diff --git a/components/safe_browsing_db/database_manager.h b/components/safe_browsing_db/database_manager.h
index dd002457f0e0e03a13806eacee98d7d2154c52cb..455f61d06d837f4166e7e1d9a25f003145953758 100644
--- a/components/safe_browsing_db/database_manager.h
+++ b/components/safe_browsing_db/database_manager.h
@@ -244,9 +244,6 @@ class SafeBrowsingDatabaseManager
CachedResultsAreEvicted);
typedef std::set<SafeBrowsingApiCheck*> ApiCheckSet;
- typedef std::map<SBPrefix, SBCachedFullHashResult> PrefixToFullHashResultsMap;
- typedef std::map<SBThreatType, PrefixToFullHashResultsMap>
- ThreatTypeToResultsMap;
// Called on the IO thread wheh the SafeBrowsingProtocolManager has received
// the full hash and api results for prefixes of the |url| argument in
@@ -256,15 +253,6 @@ class SafeBrowsingDatabaseManager
const std::vector<SBFullHashResult>& full_hash_results,
const base::Time& negative_cache_expire);
- // Looks up the cached results for |threat_type|. Fills |prefixes| with the
- // prefixes that need a request. Fills |cached_results| with the cached
- // results.
- void GetFullHashCachedResults(const SBThreatType& threat_type,
- const std::vector<SBFullHash>& full_hashes,
- base::Time now,
- std::vector<SBPrefix>* prefixes,
- std::vector<SBFullHashResult>* cached_results);
-
// Populates |md| with permission api metadata from all results that have a
// match in |full_hashes|. Returns |true| if any of the results have a match
// in |full_hashes|.
@@ -276,11 +264,6 @@ class SafeBrowsingDatabaseManager
// responsible for deleting them when removing from the set.
ApiCheckSet api_checks_;
- // A cache of V4 full hash results for api checks.
- // TODO(kcarattini): Look into moving all caching logic to
- // V4GetHashProtocolManager.
- ThreatTypeToResultsMap v4_full_hash_cache_;
-
// Created and destroyed via StartOnIOThread/StopOnIOThread.
V4GetHashProtocolManager* v4_get_hash_protocol_manager_;
« no previous file with comments | « no previous file | components/safe_browsing_db/database_manager.cc » ('j') | components/safe_browsing_db/database_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698