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

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

Issue 2750313002: Extend HistoryService with support for favicons from Google servers (Closed)
Patch Set: Rename function. Created 3 years, 9 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
« no previous file with comments | « no previous file | components/history/core/browser/history_backend.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 026d1f3e4175f67b19ec3515853487b7affdfa7b..4747695807f5dff18aeea5385056069059a143df 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 SetLastResortFavicons(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(
@@ -514,6 +519,11 @@ 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,
UpdateFaviconMappingsAndFetchNoChange);
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MergeFaviconPageURLNotInDB);
@@ -659,6 +669,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
« no previous file with comments | « no previous file | components/history/core/browser/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698