Chromium Code Reviews| Index: components/ntp_tiles/icon_cacher.h |
| diff --git a/components/ntp_tiles/icon_cacher.h b/components/ntp_tiles/icon_cacher.h |
| index 22beeb6f48c415b3616e15c8c1a94a6b4b9b3c23..e41cd85646e66476b0cad0317f9f0b99e54cb283 100644 |
| --- a/components/ntp_tiles/icon_cacher.h |
| +++ b/components/ntp_tiles/icon_cacher.h |
| @@ -20,10 +20,11 @@ class IconCacher { |
| public: |
| virtual ~IconCacher() = default; |
| - // 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). |
| + // Fetches the icon if necessary. It invokes |icon_available| if an icon was |
| + // newly fetched or loaded from a default source. |
|
mastiz
2017/03/01 08:48:12
How about the failure case? I see you removed the
fhorschig
2017/03/01 20:57:35
There is exactly one caller (as the previous revie
mastiz
2017/03/02 11:05:39
I don't feel strongly but it feels wrong that an A
fhorschig
2017/03/02 11:56:24
Relatable. I will consider reintroducing it.
|
| + // The callback will be invoked again if a newer icon has been fetched. |
| virtual void StartFetch(PopularSites::Site site, |
| - const base::Callback<void(bool)>& done) = 0; |
| + const base::Callback<void()>& icon_available) = 0; |
|
mastiz
2017/03/01 08:48:12
Having the callback called twice is not something
fhorschig
2017/03/01 20:57:35
We now have two OnceCallbacks
mastiz
2017/03/02 11:05:39
Ack, let's wait for UX feedback, since this could
fhorschig
2017/03/02 11:56:24
Acknowledged.
|
| }; |
| } // namespace ntp_tiles |