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

Unified Diff: components/history/core/browser/history_backend.h

Issue 2856873002: [Thumbnails DB] Allow setting last_requested time when accessing favicons. (Closed)
Patch Set: Splitting off clearing 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/history/core/browser/history_backend.h
diff --git a/components/history/core/browser/history_backend.h b/components/history/core/browser/history_backend.h
index 59c58389c1294a9e956c3e76b35e0a53240313c8..0401be3f5343c87fd123a3191d8da2eb579102fa 100644
--- a/components/history/core/browser/history_backend.h
+++ b/components/history/core/browser/history_backend.h
@@ -326,13 +326,15 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
const GURL& icon_url,
const std::vector<SkBitmap>& bitmaps);
- bool SetLastResortFavicons(const GURL& page_url,
- favicon_base::IconType icon_type,
- const GURL& icon_url,
- const std::vector<SkBitmap>& bitmaps);
+ bool SetOnDemandFavicons(const GURL& page_url,
+ favicon_base::IconType icon_type,
+ const GURL& icon_url,
+ const std::vector<SkBitmap>& bitmaps);
void SetFaviconsOutOfDateForPage(const GURL& page_url);
+ void TouchOnDemandFavicon(const GURL& icon_url);
+
void SetImportedFavicons(
const favicon_base::FaviconUsageDataList& favicon_usage);
@@ -523,11 +525,9 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetFaviconsReplaceBitmapData);
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest,
SetFaviconsSameFaviconURLForTwoPages);
- FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetLastResortFaviconsForEmptyDB);
- FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest,
- SetLastResortFaviconsForPageInDB);
- FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest,
- SetLastResortFaviconsForIconInDB);
+ FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetOnDemandFaviconsForEmptyDB);
+ FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetOnDemandFaviconsForPageInDB);
+ FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetOnDemandFaviconsForIconInDB);
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest,
UpdateFaviconMappingsAndFetchNoChange);
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MergeFaviconPageURLNotInDB);
@@ -681,7 +681,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
favicon_base::IconType icon_type,
const GURL& icon_url,
const std::vector<SkBitmap>& bitmaps,
- bool bitmaps_are_expired);
+ bool are_bitmaps_on_demand);
// Used by both UpdateFaviconMappingsAndFetch() and GetFavicon().
// If |page_url| is non-null and there is a favicon stored in the database
@@ -703,7 +703,8 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
// Returns true if any of the bitmap data at |icon_id| is changed as a result
// of calling this method.
bool SetFaviconBitmaps(favicon_base::FaviconID icon_id,
- const std::vector<SkBitmap>& bitmaps);
+ const std::vector<SkBitmap>& bitmaps,
+ bool are_bitmaps_on_demand);
// Returns true if the bitmap data at |bitmap_id| equals |new_bitmap_data|.
bool IsFaviconBitmapDataEqual(

Powered by Google App Engine
This is Rietveld 408576698