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

Unified Diff: components/offline_pages/background/request_queue.cc

Issue 2438503003: [Offline pages] Add MarkAttemptAbortedTask to Request Queue (Closed)
Patch Set: Addressing feedback -- adding comments and documentation Created 4 years, 2 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/background/request_queue.cc
diff --git a/components/offline_pages/background/request_queue.cc b/components/offline_pages/background/request_queue.cc
index d3f48d2a9a238de19cbeeb9d37b4fe2e1bace2e1..542b1f43763aecfd87749bb4c4e680cb35c01379 100644
--- a/components/offline_pages/background/request_queue.cc
+++ b/components/offline_pages/background/request_queue.cc
@@ -8,6 +8,7 @@
#include "base/location.h"
#include "base/threading/thread_task_runner_handle.h"
#include "components/offline_pages/background/change_requests_state_task.h"
+#include "components/offline_pages/background/mark_attempt_aborted_task.h"
#include "components/offline_pages/background/mark_attempt_started_task.h"
#include "components/offline_pages/background/remove_requests_task.h"
#include "components/offline_pages/background/request_queue_store.h"
@@ -167,6 +168,13 @@ void RequestQueue::MarkAttemptStarted(int64_t request_id,
task_queue_.AddTask(std::move(task));
}
+void RequestQueue::MarkAttemptAborted(int64_t request_id,
+ const UpdateCallback& callback) {
+ std::unique_ptr<Task> task(
+ new MarkAttemptAbortedTask(store_.get(), request_id, callback));
+ task_queue_.AddTask(std::move(task));
+}
+
void RequestQueue::PurgeRequests(const PurgeRequestsCallback& callback) {}
} // namespace offline_pages
« no previous file with comments | « components/offline_pages/background/request_queue.h ('k') | components/offline_pages/background/request_queue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698