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

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

Issue 220493003: Safebrowsing: change gethash caching to match api 2.3 rules, fix some corner cases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (including 227613008) Created 6 years, 8 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 | « no previous file | 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 a8d8bad42668b62da57033bc76def4830038ff2a..03090f6fcdf615b989c0ec4c70ad01f06f006ef4 100644
--- a/chrome/browser/safe_browsing/database_manager.h
+++ b/chrome/browser/safe_browsing/database_manager.h
@@ -76,7 +76,7 @@ class SafeBrowsingDatabaseManager
safe_browsing_util::ListType check_type; // See comment in constructor.
std::vector<SBThreatType> expected_threats;
std::vector<SBPrefix> prefix_hits;
- std::vector<SBFullHashResult> full_hits;
+ std::vector<SBFullHashResult> cache_hits;
// Vends weak pointers for TimeoutCallback(). If the response is
// received before the timeout fires, factory is destructed and
@@ -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
@@ -290,10 +289,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);
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/database_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698