#include "components/offline_items_collection/core/throttled_offline_content_provider.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "components/offline_items_collection/core/offline_item.h"
namespace offline_items_collection {
namespace {
const int kDelayBetweenUpdatesMs = …;
}
ThrottledOfflineContentProvider::ThrottledOfflineContentProvider(
OfflineContentProvider* provider)
: … { … }
ThrottledOfflineContentProvider::ThrottledOfflineContentProvider(
const base::TimeDelta& delay_between_updates,
OfflineContentProvider* provider)
: … { … }
ThrottledOfflineContentProvider::~ThrottledOfflineContentProvider() = default;
void ThrottledOfflineContentProvider::OpenItem(const OpenParams& open_params,
const ContentId& id) { … }
void ThrottledOfflineContentProvider::RemoveItem(const ContentId& id) { … }
void ThrottledOfflineContentProvider::CancelDownload(const ContentId& id) { … }
void ThrottledOfflineContentProvider::PauseDownload(const ContentId& id) { … }
void ThrottledOfflineContentProvider::ResumeDownload(const ContentId& id) { … }
void ThrottledOfflineContentProvider::GetItemById(const ContentId& id,
SingleItemCallback callback) { … }
void ThrottledOfflineContentProvider::GetAllItems(
MultipleItemCallback callback) { … }
void ThrottledOfflineContentProvider::OnGetAllItemsDone(
MultipleItemCallback callback,
const OfflineItemList& items) { … }
void ThrottledOfflineContentProvider::OnGetItemByIdDone(
SingleItemCallback callback,
const std::optional<OfflineItem>& item) { … }
void ThrottledOfflineContentProvider::GetVisualsForItem(
const ContentId& id,
GetVisualsOptions options,
VisualsCallback callback) { … }
void ThrottledOfflineContentProvider::GetShareInfoForItem(
const ContentId& id,
ShareCallback callback) { … }
void ThrottledOfflineContentProvider::RenameItem(const ContentId& id,
const std::string& name,
RenameCallback callback) { … }
void ThrottledOfflineContentProvider::OnItemsAdded(
const OfflineItemList& items) { … }
void ThrottledOfflineContentProvider::OnItemRemoved(const ContentId& id) { … }
void ThrottledOfflineContentProvider::OnItemUpdated(
const OfflineItem& item,
const std::optional<UpdateDelta>& update_delta) { … }
void ThrottledOfflineContentProvider::OnContentProviderGoingDown() { … }
void ThrottledOfflineContentProvider::UpdateItemIfPresent(
const OfflineItem& item) { … }
void ThrottledOfflineContentProvider::FlushUpdates() { … }
}