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 ae20c6239da74ffa9e481a3a30ab8236bc0dad85..59dfc5ff4e3099056fd99fa5db5d66dad7267260 100644 |
--- a/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.cc |
+++ b/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.cc |
@@ -13,6 +13,7 @@ |
#include "components/offline_pages/core/offline_page_feature.h" |
#include "components/offline_pages/core/prefetch/add_unique_urls_task.h" |
#include "components/offline_pages/core/prefetch/prefetch_service.h" |
+#include "components/offline_pages/core/prefetch/store/prefetch_store_command_factory.h" |
#include "url/gurl.h" |
namespace offline_pages { |
@@ -34,12 +35,16 @@ void PrefetchDispatcherImpl::SetService(PrefetchService* service) { |
} |
void PrefetchDispatcherImpl::AddCandidatePrefetchURLs( |
+ const std::string& name_space, |
const std::vector<PrefetchURL>& prefetch_urls) { |
if (!IsPrefetchingOfflinePagesEnabled()) |
return; |
+ PrefetchStoreCommandFactory* command_factory = |
+ service_->GetPrefetchStoreCommandFactory(); |
std::unique_ptr<Task> add_task = base::MakeUnique<AddUniqueUrlsTask>( |
- service_->GetPrefetchStore(), prefetch_urls); |
+ command_factory->createAddUrls(), command_factory->createCleanupZombies(), |
+ name_space, prefetch_urls); |
task_queue_.AddTask(std::move(add_task)); |
} |