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

Unified Diff: components/safe_browsing/password_protection/password_protection_service.h

Issue 2870193002: Clean up expired verdicts at shutdown (Closed)
Patch Set: resolve container-overflow Created 3 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: components/safe_browsing/password_protection/password_protection_service.h
diff --git a/components/safe_browsing/password_protection/password_protection_service.h b/components/safe_browsing/password_protection/password_protection_service.h
index e688efc4414070f76c81ef416e3b92f5be58dc62..20c32141b5525a0fa08f728bc4c8ab9aa071dd70 100644
--- a/components/safe_browsing/password_protection/password_protection_service.h
+++ b/components/safe_browsing/password_protection/password_protection_service.h
@@ -71,6 +71,9 @@ class PasswordProtectionService : public history::HistoryServiceObserver {
LoginReputationClientResponse* verdict,
const base::Time& receive_time);
+ // Removes all the expired verdicts from cache.
+ void CleanUpExpiredVerdicts();
+
// Creates an instance of PasswordProtectionRequest and call Start() on that
// instance. This function also insert this request object in |requests_| for
// record keeping.
@@ -150,7 +153,9 @@ class PasswordProtectionService : public history::HistoryServiceObserver {
FRIEND_TEST_ALL_PREFIXES(PasswordProtectionServiceTest,
TestPathVariantsMatchCacheExpression);
FRIEND_TEST_ALL_PREFIXES(PasswordProtectionServiceTest,
- TestCleanUpCachedVerdicts);
+ TestRemoveCachedVerdictOnURLsDeleted);
+ FRIEND_TEST_ALL_PREFIXES(PasswordProtectionServiceTest,
+ TestCleanUpExpiredVerdict);
// Overridden from history::HistoryServiceObserver.
void OnURLsDeleted(history::HistoryService* history_service,

Powered by Google App Engine
This is Rietveld 408576698