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

Unified Diff: components/ntp_tiles/icon_cacher_impl.h

Issue 2722133002: [Remote suggestions] Use Google server for fetching MostLikely icons (Closed)
Patch Set: Created 3 years, 10 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 | « components/ntp_tiles/icon_cacher.h ('k') | components/ntp_tiles/icon_cacher_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1028f72b29b7153cdd64706eaa4bc3623de11b41..86665f651d4aeb83c717b73410f2f841f8c7279d 100644
--- a/components/ntp_tiles/icon_cacher_impl.h
+++ b/components/ntp_tiles/icon_cacher_impl.h
@@ -16,10 +16,12 @@
namespace favicon {
class FaviconService;
+class LargeIconService;
} // namespace favicon
namespace favicon_base {
struct FaviconImageResult;
+struct LargeIconResult;
} // namespace favicon_base
namespace gfx {
@@ -34,12 +36,17 @@ 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::Callback<void(bool)>& done) override;
+ void StartFetchPopularSites(PopularSites::Site site,
+ const base::Callback<void(bool)>& done) override;
+ void StartFetchMostLikely(const GURL& page_url,
+ const base::Callback<void(bool)>& done) override;
private:
void OnGetFaviconImageForPageURLFinished(
@@ -47,13 +54,24 @@ class IconCacherImpl : public IconCacher {
const base::Callback<void(bool)>& done,
const favicon_base::FaviconImageResult& result);
- void OnFaviconDownloaded(PopularSites::Site site,
- const base::Callback<void(bool)>& done,
- const std::string& id,
- const gfx::Image& fetched_image);
+ void OnPopularSitesFaviconDownloaded(PopularSites::Site site,
+ const base::Callback<void(bool)>& done,
+ const std::string& id,
+ const gfx::Image& fetched_image);
+
+ void OnGetLargeIconOrFallbackStyleFinished(
+ const GURL& page_url,
+ const base::Callback<void(bool)>& done,
+ const favicon_base::LargeIconResult& result);
+
+ void OnMostLikelyFaviconDownloaded(
+ const GURL& page_url,
+ const base::Callback<void(bool)>& done,
+ const favicon_base::LargeIconResult& result);
base::CancelableTaskTracker tracker_;
favicon::FaviconService* const favicon_service_;
+ favicon::LargeIconService* const large_icon_service_;
std::unique_ptr<image_fetcher::ImageFetcher> const image_fetcher_;
DISALLOW_COPY_AND_ASSIGN(IconCacherImpl);
« no previous file with comments | « components/ntp_tiles/icon_cacher.h ('k') | components/ntp_tiles/icon_cacher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698