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

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

Issue 280013002: [safe browsing] Switch to independent cache lifetimes for gethash items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bah, just use base::Time and be done. Created 6 years, 7 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/database_manager.h
diff --git a/chrome/browser/safe_browsing/database_manager.h b/chrome/browser/safe_browsing/database_manager.h
index 8f2b219b449470f0a9e21b46f8b4c5a84ad91e34..0ca1c8f5d4cb70fe3ca1f12c4ca65a9f39aa7b10 100644
--- a/chrome/browser/safe_browsing/database_manager.h
+++ b/chrome/browser/safe_browsing/database_manager.h
@@ -179,10 +179,9 @@ class SafeBrowsingDatabaseManager
// Called on the IO thread when the SafeBrowsingProtocolManager has received
// the full hash results for prefix hits detected in the database.
- void HandleGetHashResults(
- SafeBrowsingCheck* check,
- const std::vector<SBFullHashResult>& full_hashes,
- bool can_cache);
+ void HandleGetHashResults(SafeBrowsingCheck* check,
+ const std::vector<SBFullHashResult>& full_hashes,
+ const base::TimeDelta& cache_lifetime);
// Log the user perceived delay caused by SafeBrowsing. This delay is the time
// delta starting from when we would have started reading data from the
@@ -288,10 +287,6 @@ class SafeBrowsingDatabaseManager
// database is a synchronous operation.
void OnResetDatabase();
- // Store in-memory the GetHash response. Runs on the database thread.
- void CacheHashResults(const std::vector<SBPrefix>& prefixes,
- const std::vector<SBFullHashResult>& full_hashes);
-
// Internal worker function for processing full hashes.
void OnHandleGetHashResults(SafeBrowsingCheck* check,
const std::vector<SBFullHashResult>& full_hashes);

Powered by Google App Engine
This is Rietveld 408576698