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

Unified Diff: components/ntp_tiles/icon_cacher.h

Issue 2866033002: [NTP Tiles] Fetch missing MostLikely tiles from a Google server (Closed)
Patch Set: Comments #3 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/ntp_tiles/icon_cacher.h
diff --git a/components/ntp_tiles/icon_cacher.h b/components/ntp_tiles/icon_cacher.h
index bfea2969464059c7a4e703829c4f9ad70d896f9f..8b5a2d3975da7d045960e0ebc03cee5d4983488d 100644
--- a/components/ntp_tiles/icon_cacher.h
+++ b/components/ntp_tiles/icon_cacher.h
@@ -10,12 +10,12 @@
namespace ntp_tiles {
-// Ensures that a Popular Sites icon is cached, downloading and saving it if
-// not.
+// Ensures that Popular Sites icons and MostLikely icons are cached, downloading
+// and saving them if not.
//
-// Does not provide any way to get a fetched favicon; use the FaviconService for
-// that. All this interface guarantees is that FaviconService will be able to
-// get you an icon (if it exists).
+// Does not provide any way to get a fetched favicon; use the FaviconService /
+// LargeIconService for that. All this interface guarantees is that
+// FaviconService will be able to get you an icon (if it exists).
class IconCacher {
public:
virtual ~IconCacher() = default;
@@ -25,9 +25,15 @@ class IconCacher {
// If there are preliminary icons (e.g. provided by static resources), the
// optional |preliminary_icon_available| callback will be invoked in addition.
// TODO(fhorschig): In case we keep these, make them OnceClosures.
- virtual void StartFetch(PopularSites::Site site,
- const base::Closure& icon_available,
- const base::Closure& preliminary_icon_available) = 0;
+ virtual void StartFetchPopularSites(
+ PopularSites::Site site,
+ const base::Closure& icon_available,
+ const base::Closure& preliminary_icon_available) = 0;
+
+ // Fetches the icon if necessary, then invokes |done| with true if it was
+ // newly fetched (false if it was already cached or could not be fetched).
+ virtual void StartFetchMostLikely(const GURL& page_url,
+ const base::Closure& icon_available) = 0;
};
} // namespace ntp_tiles

Powered by Google App Engine
This is Rietveld 408576698