| Index: components/ntp_tiles/icon_cacher_impl.h
|
| diff --git a/components/ntp_tiles/icon_cacher_impl.h b/components/ntp_tiles/icon_cacher_impl.h
|
| index 58ed735eb653b1a63dd899393fc0049190c55db9..52bd3fd373dcaa3397ddbcea0dd6a0872e57ac40 100644
|
| --- a/components/ntp_tiles/icon_cacher_impl.h
|
| +++ b/components/ntp_tiles/icon_cacher_impl.h
|
| @@ -17,10 +17,12 @@
|
|
|
| namespace favicon {
|
| class FaviconService;
|
| +class LargeIconService;
|
| } // namespace favicon
|
|
|
| namespace favicon_base {
|
| struct FaviconImageResult;
|
| +struct LargeIconResult;
|
| } // namespace favicon_base
|
|
|
| namespace gfx {
|
| @@ -36,13 +38,19 @@ namespace ntp_tiles {
|
|
|
| class IconCacherImpl : public IconCacher {
|
| public:
|
| + // TODO(jkrcal): Make this eventually use only LargeIconService.
|
| + // crbug.com/696563
|
| IconCacherImpl(favicon::FaviconService* favicon_service,
|
| + favicon::LargeIconService* large_icon_service,
|
| std::unique_ptr<image_fetcher::ImageFetcher> image_fetcher);
|
| ~IconCacherImpl() override;
|
|
|
| - void StartFetch(PopularSites::Site site,
|
| - const base::Closure& icon_available,
|
| - const base::Closure& preliminary_icon_available) override;
|
| + void StartFetchPopularSites(
|
| + PopularSites::Site site,
|
| + const base::Closure& icon_available,
|
| + const base::Closure& preliminary_icon_available) override;
|
| + void StartFetchMostLikely(const GURL& page_url,
|
| + const base::Closure& icon_available) override;
|
|
|
| private:
|
| using CancelableImageCallback =
|
| @@ -54,7 +62,7 @@ class IconCacherImpl : public IconCacher {
|
| const base::Closure& preliminary_icon_available,
|
| const favicon_base::FaviconImageResult& result);
|
|
|
| - void OnFaviconDownloaded(
|
| + void OnPopularSitesFaviconDownloaded(
|
| PopularSites::Site site,
|
| std::unique_ptr<CancelableImageCallback> preliminary_callback,
|
| const base::Closure& icon_available,
|
| @@ -69,8 +77,17 @@ class IconCacherImpl : public IconCacher {
|
| const base::Closure& icon_available,
|
| const gfx::Image& image);
|
|
|
| + void OnGetLargeIconOrFallbackStyleFinished(
|
| + const GURL& page_url,
|
| + const base::Closure& icon_available,
|
| + const favicon_base::LargeIconResult& result);
|
| +
|
| + void OnMostLikelyFaviconDownloaded(const base::Closure& icon_available,
|
| + bool success);
|
| +
|
| base::CancelableTaskTracker tracker_;
|
| favicon::FaviconService* const favicon_service_;
|
| + favicon::LargeIconService* const large_icon_service_;
|
| std::unique_ptr<image_fetcher::ImageFetcher> const image_fetcher_;
|
|
|
| base::WeakPtrFactory<IconCacherImpl> weak_ptr_factory_;
|
|
|