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

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

Issue 2757773002: Support providers with two namespaces (Closed)
Patch Set: Address comments Created 3 years, 9 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 | « no previous file | components/offline_items_collection/core/offline_content_aggregator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_items_collection/core/offline_content_aggregator.h
diff --git a/components/offline_items_collection/core/offline_content_aggregator.h b/components/offline_items_collection/core/offline_content_aggregator.h
index 8863760754c739889e4f82229e8586a87fde5596..9a13e0b097ff419589978495d21297da3599ea72 100644
--- a/components/offline_items_collection/core/offline_content_aggregator.h
+++ b/components/offline_items_collection/core/offline_content_aggregator.h
@@ -56,6 +56,17 @@ class OfflineContentAggregator : public OfflineContentProvider,
// |name_space|. UI actions taken on OfflineItems with |name_space| will be
// routed to |provider|. |provider| is expected to only expose OfflineItems
// with |name_space| set.
+ // It is okay to register the same provider with multiple unique namespaces.
+ // The class will work as expected with a few caveats. These are fixable if
+ // they are necessary for proper operation. Contact dtrainor@ if changes to
+ // this behavior is needed.
+ // 1. Unregistering the first namespace won't remove any pending actions
+ // that are queued for this provider. That means the provider might
+ // still get actions for the removed namespace once it is done
+ // initializing itself. This case must be handled by the individual
+ // provider for now.
+ // 2. The provider needs to handle calls to GetAllItems properly (not return
+ // any items for a namespace that it didn't register).
void RegisterProvider(const std::string& name_space,
OfflineContentProvider* provider);
« no previous file with comments | « no previous file | components/offline_items_collection/core/offline_content_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698