Index: components/offline_pages/core/prefetch/add_unique_urls_task.h |
diff --git a/components/offline_pages/core/prefetch/add_unique_urls_task.h b/components/offline_pages/core/prefetch/add_unique_urls_task.h |
index c7a116131b057ad8ab9cf5f29e44cb57fc333c24..3d9f9e57cc5f6c20eae89f109922c1e9457c3352 100644 |
--- a/components/offline_pages/core/prefetch/add_unique_urls_task.h |
+++ b/components/offline_pages/core/prefetch/add_unique_urls_task.h |
@@ -5,13 +5,14 @@ |
#ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_ADD_UNIQUE_URLS_TASK_H_ |
#define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_ADD_UNIQUE_URLS_TASK_H_ |
+#include <string> |
#include <vector> |
#include "base/memory/weak_ptr.h" |
-#include "components/offline_pages/core/prefetch/prefetch_store.h" |
#include "components/offline_pages/core/prefetch/prefetch_types.h" |
+#include "components/offline_pages/core/prefetch/store/add_urls_store_command.h" |
+#include "components/offline_pages/core/prefetch/store/cleanup_zombies_store_command.h" |
#include "components/offline_pages/core/task.h" |
-#include "url/gurl.h" |
namespace offline_pages { |
@@ -26,14 +27,21 @@ namespace offline_pages { |
// from the store. |
class AddUniqueUrlsTask : public Task { |
public: |
- AddUniqueUrlsTask(PrefetchStore* store, |
- const std::vector<PrefetchURL>& prefetch_urls); |
+ AddUniqueUrlsTask( |
+ std::unique_ptr<AddUrlsStoreCommand> add_urls_command, |
+ std::unique_ptr<CleanupZombiesStoreCommand> zombies_cleanup_command, |
+ const std::string& name_space, |
+ const std::vector<PrefetchURL>& prefetch_urls); |
~AddUniqueUrlsTask() override; |
void Run() override; |
private: |
- PrefetchStore* prefetch_store_; |
+ void OnUrlsAdded(bool success); |
+ |
+ std::unique_ptr<AddUrlsStoreCommand> add_urls_command_; |
+ std::unique_ptr<CleanupZombiesStoreCommand> zombies_cleanup_command_; |
+ const std::string& name_space_; |
std::vector<PrefetchURL> prefetch_urls_; |
base::WeakPtrFactory<AddUniqueUrlsTask> weak_ptr_factory_; |