Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Unified Diff: components/offline_pages/core/prefetch/add_unique_urls_task.cc

Issue 2879013002: Create skeleton for the Prefetching store and initial pipeline step. (Closed)
Patch Set: A couple of minor changes. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/core/prefetch/add_unique_urls_task.cc
diff --git a/components/offline_pages/core/prefetch/add_unique_urls_task.cc b/components/offline_pages/core/prefetch/add_unique_urls_task.cc
new file mode 100644
index 0000000000000000000000000000000000000000..486a89a0e05536da509b24b91432a6f0d9eb4b47
--- /dev/null
+++ b/components/offline_pages/core/prefetch/add_unique_urls_task.cc
@@ -0,0 +1,26 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/offline_pages/core/prefetch/add_unique_urls_task.h"
+
+namespace offline_pages {
+
+AddUniqueUrlsTask::AddUniqueUrlsTask(
+ PrefetchStore* store,
+ const std::string& name_space,
+ const std::vector<PrefetchURL>& prefetch_urls)
+ : store_(store),
+ name_space_(name_space),
+ prefetch_urls_(prefetch_urls),
+ weak_ptr_factory_(this) {}
+
+AddUniqueUrlsTask::~AddUniqueUrlsTask() {}
+
+void AddUniqueUrlsTask::Run() {
dewittj 2017/05/23 20:02:20 Task::TaskComplete is never called?
carlosk 2017/05/24 20:57:26 Done.
+ store_->CreateItemsForUniqueUrls(
+ name_space_, prefetch_urls_,
+ PrefetchStore::CreateItemsForUniqueUrlsCallback());
dewittj 2017/05/23 20:02:20 This just runs a void callback, doesn't make sense
carlosk 2017/05/24 20:57:26 Now that we need to call TaskComplete we need the
+}
+
+} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698