Index: components/history/core/browser/expire_history_backend.h |
diff --git a/components/history/core/browser/expire_history_backend.h b/components/history/core/browser/expire_history_backend.h |
index ebffc5b62e4e14ee9b45b271c18c0a4f1333b326..e2fb4f848b2cb1cbd0c390d8abe36dc68ef89041 100644 |
--- a/components/history/core/browser/expire_history_backend.h |
+++ b/components/history/core/browser/expire_history_backend.h |
@@ -20,6 +20,7 @@ class GURL; |
class TestingProfile; |
namespace base { |
+struct Feature; |
class SequencedTaskRunner; |
} |
@@ -42,6 +43,11 @@ class ExpiringVisitsReader { |
typedef std::vector<const ExpiringVisitsReader*> ExpiringVisitsReaders; |
+namespace internal { |
+// Feature that enables clearing old on-demand favicons. |
+extern const base::Feature kClearOldOnDemandFavicons; |
+} // namespace internal |
+ |
// Helper component to HistoryBackend that manages expiration and deleting of |
// history. |
// |
@@ -102,6 +108,10 @@ class ExpireHistoryBackend { |
FRIEND_TEST_ALL_PREFIXES(ExpireHistoryTest, ExpireSomeOldHistory); |
FRIEND_TEST_ALL_PREFIXES(ExpireHistoryTest, ExpiringVisitsReader); |
FRIEND_TEST_ALL_PREFIXES(ExpireHistoryTest, ExpireSomeOldHistoryWithSource); |
+ FRIEND_TEST_ALL_PREFIXES(ExpireHistoryTest, |
+ ClearOldOnDemandFaviconsDoesNotDeleteStarred); |
+ FRIEND_TEST_ALL_PREFIXES(ExpireHistoryTest, |
+ ClearOldOnDemandFaviconsDoesDeleteUnstarred); |
friend class ::TestingProfile; |
struct DeleteEffects { |
@@ -206,6 +216,9 @@ class ExpireHistoryBackend { |
// future. |
void DoExpireIteration(); |
+ // Clears all old on-demand favicons from thumbnail database. |
+ void ClearOldOnDemandFavicons(base::Time expiration_threshold); |
+ |
// Tries to expire the oldest |max_visits| visits from history that are older |
// than |time_threshold|. The return value indicates if we think there might |
// be more history to expire with the current time threshold (it does not |