| 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 2a62a79deccf02c0276c3ab2b043e86708491a9f..670293524c7ed3d7758b6bf39d22525ef801cb9d 100644
|
| --- a/components/history/core/browser/history_backend.h
|
| +++ b/components/history/core/browser/history_backend.h
|
| @@ -325,6 +325,11 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
|
| const GURL& icon_url,
|
| const std::vector<SkBitmap>& bitmaps);
|
|
|
| + bool SetExpiredFaviconsIfNoneKnown(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 SetImportedFavicons(
|
| @@ -515,6 +520,12 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
|
| FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest,
|
| SetFaviconsSameFaviconURLForTwoPages);
|
| FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest,
|
| + SetExpiredFaviconsIfNoneKnownForEmptyDB);
|
| + FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest,
|
| + SetExpiredFaviconsIfNoneKnownForPageInDB);
|
| + FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest,
|
| + SetExpiredFaviconsIfNoneKnownForIconInDB);
|
| + FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest,
|
| UpdateFaviconMappingsAndFetchNoChange);
|
| FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MergeFaviconPageURLNotInDB);
|
| FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MergeFaviconPageURLInDB);
|
| @@ -656,6 +667,16 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
|
|
|
| // Favicons ------------------------------------------------------------------
|
|
|
| + // If |bitmaps_are_expired| is true, the icon for |icon_url| will be modified
|
| + // only if it's not present in the database. In that case, it will be
|
| + // initially set as expired. Returns whether the new bitmaps were actually
|
| + // written.
|
| + bool SetFaviconsImpl(const GURL& page_url,
|
| + favicon_base::IconType icon_type,
|
| + const GURL& icon_url,
|
| + const std::vector<SkBitmap>& bitmaps,
|
| + bool bitmaps_are_expired);
|
| +
|
| // Used by both UpdateFaviconMappingsAndFetch and GetFavicons.
|
| // If |page_url| is non-null, the icon urls for |page_url| (and all
|
| // redirects) are set to the subset of |icon_urls| for which icons are
|
|
|