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

Unified Diff: components/offline_items_collection/core/offline_content_aggregator.cc

Issue 2811803006: Add support for pulling icons for OfflineItems (Closed)
Patch Set: More findbugs Created 3 years, 8 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
Index: components/offline_items_collection/core/offline_content_aggregator.cc
diff --git a/components/offline_items_collection/core/offline_content_aggregator.cc b/components/offline_items_collection/core/offline_content_aggregator.cc
index acbfd5a130b4ed2daf7b2eeb38d6e895071695ef..19eaa574efe84bda5c98a87a569c7a2172fb004a 100644
--- a/components/offline_items_collection/core/offline_content_aggregator.cc
+++ b/components/offline_items_collection/core/offline_content_aggregator.cc
@@ -145,6 +145,20 @@ OfflineContentAggregator::GetAllItems() {
return items;
}
+void OfflineContentAggregator::GetVisualsForItem(
+ const ContentId& id,
+ const VisualsCallback& callback) {
+ auto it = providers_.find(id.name_space);
+
+ if (it == providers_.end()) {
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback, id, nullptr));
+ return;
+ }
+
+ it->second->GetVisualsForItem(id, callback);
+}
+
void OfflineContentAggregator::AddObserver(
OfflineContentProvider::Observer* observer) {
DCHECK(observer);

Powered by Google App Engine
This is Rietveld 408576698