The Mediator should be pushing changes to the UI layer. It should be the one fetching the favicon during the item creation, and calling reconfigure on the datasink.
Once the mediator is doing the fetch, it should log the impression upon receiving the callback.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a52bd263e1713082d7048dacd1964448ec4df0e3 commit a52bd263e1713082d7048dacd1964448ec4df0e3 Author: gambard <gambard@chromium.org> Date: Tue Jul 04 14:32:17 2017 Add ContentSuggestionsFaviconMediator This CL adds a ContentSuggestionsFaviconMediator, charged to fetch the favicons for the ContentSuggestions items. This object lives in the mediator layer. This CL also modifies the fetching to initiate it in the mediator instead of the ViewController. BUG= 736002 Change-Id: I10e25462f38145354c511474e390640da7e01b9a Reviewed-on: https://chromium-review.googlesource.com/558997 Commit-Queue: Gauthier Ambard <gambard@chromium.org> Reviewed-by: Louis Romero <lpromero@chromium.org> Cr-Commit-Position: refs/heads/master@{#484103} [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/content_suggestions/BUILD.gn [add] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/content_suggestions/content_suggestions_favicon_mediator.h [add] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/content_suggestions/content_suggestions_favicon_mediator.mm [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/content_suggestions/mediator_util.h [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/content_suggestions/mediator_util.mm [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.h [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_item.h [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_text_item.mm [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_whats_new_item.mm [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/ui/content_suggestions/cells/suggested_content.h [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink.h [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/chrome/browser/ui/content_suggestions/content_suggestions_data_source.h [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/showcase/content_suggestions/sc_content_suggestions_data_source.mm [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/showcase/content_suggestions/sc_content_suggestions_item.h [modify] https://crrev.com/a52bd263e1713082d7048dacd1964448ec4df0e3/ios/showcase/content_suggestions/sc_content_suggestions_most_visited_item.h
Comment 1 by gambard@chromium.org
, Jun 27 2017