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

Unified Diff: components/history/core/browser/thumbnail_database.cc

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 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
Index: components/history/core/browser/thumbnail_database.cc
diff --git a/components/history/core/browser/thumbnail_database.cc b/components/history/core/browser/thumbnail_database.cc
index e1579f9afb46ed8f1b7c8264f3c98e400c5bba61..7fc68d43b7bb7e5437db4a18d79a51e88d223129 100644
--- a/components/history/core/browser/thumbnail_database.cc
+++ b/components/history/core/browser/thumbnail_database.cc
@@ -1143,13 +1143,19 @@ bool ThumbnailDatabase::RetainDataForPageUrls(
"ON (old.id = mapping.old_icon_id)";
const char kDropOldFaviconsTable[] = "DROP TABLE old_favicons";
+ // Set the retained favicon bitmaps to be expired (last_updated == 0).
+ // The user may be deleting their favicon bitmaps because the favicon bitmaps
+ // are incorrect. Expiring a favicon bitmap causes it to be redownloaded when
+ // the user visits a page associated with the favicon bitmap. See
+ // crbug.com/474421 for an example of a bug which caused favicon bitmaps to
+ // become incorrect.
const char kRenameFaviconBitmapsTable[] =
"ALTER TABLE favicon_bitmaps RENAME TO old_favicon_bitmaps";
const char kCopyFaviconBitmaps[] =
"INSERT INTO favicon_bitmaps "
" (icon_id, last_updated, image_data, width, height, last_requested) "
- "SELECT mapping.new_icon_id, old.last_updated, "
- " old.image_data, old.width, old.height, old.last_requested "
+ "SELECT mapping.new_icon_id, 0, old.image_data, old.width, old.height,"
+ " old.last_requested "
"FROM old_favicon_bitmaps AS old "
"JOIN temp.icon_id_mapping AS mapping "
"ON (old.icon_id = mapping.old_icon_id)";
« no previous file with comments | « components/history/core/browser/thumbnail_database.h ('k') | components/history/core/browser/top_sites_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698