| 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 52bd3fd373dcaa3397ddbcea0dd6a0872e57ac40..85d02b760f1e7ac6752aeecdfe85dfa62d3b5e07 100644
|
| --- a/components/ntp_tiles/icon_cacher_impl.h
|
| +++ b/components/ntp_tiles/icon_cacher_impl.h
|
| @@ -6,7 +6,9 @@
|
| #define COMPONENTS_NTP_TILES_ICON_CACHER_IMPL_H_
|
|
|
| #include <memory>
|
| +#include <set>
|
| #include <string>
|
| +#include <vector>
|
|
|
| #include "base/callback.h"
|
| #include "base/cancelable_callback.h"
|
| @@ -58,37 +60,39 @@ class IconCacherImpl : public IconCacher {
|
|
|
| void OnGetFaviconImageForPageURLFinished(
|
| PopularSites::Site site,
|
| - const base::Closure& icon_available,
|
| const base::Closure& preliminary_icon_available,
|
| const favicon_base::FaviconImageResult& result);
|
|
|
| void OnPopularSitesFaviconDownloaded(
|
| PopularSites::Site site,
|
| std::unique_ptr<CancelableImageCallback> preliminary_callback,
|
| - const base::Closure& icon_available,
|
| const std::string& id,
|
| const gfx::Image& fetched_image,
|
| const image_fetcher::RequestMetadata& metadata);
|
|
|
| std::unique_ptr<CancelableImageCallback> MaybeProvideDefaultIcon(
|
| const PopularSites::Site& site,
|
| - const base::Closure& icon_available);
|
| - void SaveAndNotifyIconForSite(const PopularSites::Site& site,
|
| - const base::Closure& icon_available,
|
| - const gfx::Image& image);
|
| + const base::Closure& preliminary_icon_available);
|
| + void SaveAndNotifyDefaultIconForSite(
|
| + const PopularSites::Site& site,
|
| + const base::Closure& preliminary_icon_available,
|
| + const gfx::Image& image);
|
| + void SaveIconForSite(const PopularSites::Site& site, 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);
|
| + bool StartRequest(const GURL& request_url,
|
| + const base::Closure& icon_available);
|
| + void FinishRequestAndNotifyIconAvailable(const GURL& request_url,
|
| + bool newly_available);
|
|
|
| base::CancelableTaskTracker tracker_;
|
| favicon::FaviconService* const favicon_service_;
|
| favicon::LargeIconService* const large_icon_service_;
|
| std::unique_ptr<image_fetcher::ImageFetcher> const image_fetcher_;
|
| + std::map<GURL, std::vector<base::Closure>> in_flight_requests_;
|
|
|
| base::WeakPtrFactory<IconCacherImpl> weak_ptr_factory_;
|
|
|
|
|