| Index: components/offline_pages/core/prefetch/prefetch_dispatcher_impl.cc
|
| diff --git a/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.cc b/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.cc
|
| index 3c84ca5e937b4883abca3ce91a3b0e33a1b890bf..205f8353ce0f278f63a30b79c2031351eaa3e58d 100644
|
| --- a/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.cc
|
| +++ b/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.cc
|
| @@ -4,25 +4,35 @@
|
|
|
| #include "components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h"
|
|
|
| +#include "base/memory/ptr_util.h"
|
| +#include "components/offline_pages/core/prefetch/add_unique_urls_task.h"
|
| +#include "components/offline_pages/core/task.h"
|
| #include "url/gurl.h"
|
|
|
| namespace offline_pages {
|
|
|
| -PrefetchDispatcherImpl::PrefetchDispatcherImpl() {}
|
| +PrefetchDispatcherImpl::PrefetchDispatcherImpl(
|
| + std::unique_ptr<PrefetchStore> store)
|
| + : store_(std::move(store)) {}
|
|
|
| PrefetchDispatcherImpl::~PrefetchDispatcherImpl() = default;
|
|
|
| void PrefetchDispatcherImpl::AddCandidatePrefetchURLs(
|
| - const std::vector<PrefetchURL>& url_suggestions) {
|
| - NOTIMPLEMENTED();
|
| + const std::string& name_space,
|
| + const std::vector<PrefetchURL>& prefetch_urls) {
|
| + std::unique_ptr<Task> add_task = base::MakeUnique<AddUniqueUrlsTask>(
|
| + store_.get(), name_space, prefetch_urls);
|
| + task_queue_.AddTask(std::move(add_task));
|
| }
|
| +
|
| void PrefetchDispatcherImpl::RemoveAllUnprocessedPrefetchURLs(
|
| const std::string& name_space) {
|
| NOTIMPLEMENTED();
|
| }
|
|
|
| void PrefetchDispatcherImpl::RemovePrefetchURLsByClientId(
|
| - const ClientId& client_id) {
|
| + const std::string& name_space,
|
| + const std::string& client_id) {
|
| NOTIMPLEMENTED();
|
| }
|
|
|
|
|