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

Side by Side Diff: components/history/core/browser/expire_history_backend.h

Issue 2903573002: [Thumbnails DB] Add functionality to clear unused on-demand favicons. (Closed)
Patch Set: Implementation variants + unit-tests Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_EXPIRE_HISTORY_BACKEND_H_ 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_EXPIRE_HISTORY_BACKEND_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_EXPIRE_HISTORY_BACKEND_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_EXPIRE_HISTORY_BACKEND_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // 172 //
173 // The visits in the given vector should have already been deleted from the 173 // The visits in the given vector should have already been deleted from the
174 // database, and the list of affected URLs already be filled into 174 // database, and the list of affected URLs already be filled into
175 // |depenencies->affected_urls|. 175 // |depenencies->affected_urls|.
176 // 176 //
177 // Starred URLs will not be deleted. The information in the dependencies that 177 // Starred URLs will not be deleted. The information in the dependencies that
178 // DeleteOneURL fills in will be updated, and this function will also delete 178 // DeleteOneURL fills in will be updated, and this function will also delete
179 // any now-unused favicons. 179 // any now-unused favicons.
180 void ExpireURLsForVisits(const VisitVector& visits, DeleteEffects* effects); 180 void ExpireURLsForVisits(const VisitVector& visits, DeleteEffects* effects);
181 181
182 // Clears all old on-demand favicons from thumbnail database.
183 void ClearOldOnDemandFavicons();
184
182 // Deletes the favicons listed in |effects->affected_favicons| if they are 185 // Deletes the favicons listed in |effects->affected_favicons| if they are
183 // unsued. Fails silently (we don't care about favicons so much, so don't want 186 // unsued. Fails silently (we don't care about favicons so much, so don't want
184 // to stop everything if it fails). Fills |expired_favicons| with the set of 187 // to stop everything if it fails). Fills |expired_favicons| with the set of
185 // favicon urls that no longer have associated visits and were therefore 188 // favicon urls that no longer have associated visits and were therefore
186 // expired. 189 // expired.
187 void DeleteFaviconsIfPossible(DeleteEffects* effects); 190 void DeleteFaviconsIfPossible(DeleteEffects* effects);
188 191
189 // Enum representing what type of action resulted in the history DB deletion. 192 // Enum representing what type of action resulted in the history DB deletion.
190 enum DeletionType { 193 enum DeletionType {
191 // User initiated the deletion from the History UI. 194 // User initiated the deletion from the History UI.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // Used to generate runnable methods to do timers on this class. They will be 266 // Used to generate runnable methods to do timers on this class. They will be
264 // automatically canceled when this class is deleted. 267 // automatically canceled when this class is deleted.
265 base::WeakPtrFactory<ExpireHistoryBackend> weak_factory_; 268 base::WeakPtrFactory<ExpireHistoryBackend> weak_factory_;
266 269
267 DISALLOW_COPY_AND_ASSIGN(ExpireHistoryBackend); 270 DISALLOW_COPY_AND_ASSIGN(ExpireHistoryBackend);
268 }; 271 };
269 272
270 } // namespace history 273 } // namespace history
271 274
272 #endif // COMPONENTS_HISTORY_CORE_BROWSER_EXPIRE_HISTORY_BACKEND_H_ 275 #endif // COMPONENTS_HISTORY_CORE_BROWSER_EXPIRE_HISTORY_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698