| Index: components/offline_pages/downloads/download_ui_adapter.h
|
| diff --git a/components/offline_pages/downloads/download_ui_adapter.h b/components/offline_pages/downloads/download_ui_adapter.h
|
| index 9363a946bff488b015186cfcca5e04e467a1cf0b..d96f11d7da757836ac0aee7a2cfc360b2a58b5e3 100644
|
| --- a/components/offline_pages/downloads/download_ui_adapter.h
|
| +++ b/components/offline_pages/downloads/download_ui_adapter.h
|
| @@ -10,6 +10,7 @@
|
| #include <string>
|
|
|
| #include "base/observer_list.h"
|
| +#include "base/supports_user_data.h"
|
| #include "components/offline_pages/downloads/download_ui_item.h"
|
| #include "components/offline_pages/offline_page_model.h"
|
| #include "components/offline_pages/offline_page_types.h"
|
| @@ -26,7 +27,8 @@ typedef
|
| // UI components if needed. It manages the cache of DownloadUIItems, so after
|
| // initial load the UI components can synchronously pull the whoel list or any
|
| // item by its guid.
|
| -class DownloadUIAdapter : public OfflinePageModel::Observer {
|
| +class DownloadUIAdapter : public OfflinePageModel::Observer,
|
| + public base::SupportsUserData::Data {
|
| public:
|
| // Observer, normally implemented by UI or a Bridge.
|
| class Observer {
|
| @@ -54,6 +56,9 @@ class DownloadUIAdapter : public OfflinePageModel::Observer {
|
| explicit DownloadUIAdapter(OfflinePageModel* model);
|
| ~DownloadUIAdapter() override;
|
|
|
| + static DownloadUIAdapter* FromOfflinePageModel(
|
| + OfflinePageModel* offline_page_model);
|
| +
|
| // This adapter is potentially shared by UI elements, each of which adds
|
| // itself as an observer.
|
| // When the last observer si removed, cached list of items is destroyed and
|
| @@ -99,4 +104,4 @@ class DownloadUIAdapter : public OfflinePageModel::Observer {
|
|
|
| } // namespace offline_pages
|
|
|
| -#endif // COMPONENTS_OFFLINE_PAGE_DOWNLOADS_DOWNLOAD_UI_ADAPTER_H_
|
| +#endif // COMPONENTS_OFFLINE_PAGE_DOWNLOADS_DOWNLOAD_UI_ADAPTER_H_
|
|
|