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

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

Issue 2416083002: [Offline pages] Introduction of MarkAttemptStartedTask with tests (Closed)
Patch Set: Addressing code review feedback 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 b491824edebd3870ab479ec1973d939f3bb0115e..d3f48d2a9a238de19cbeeb9d37b4fe2e1bace2e1 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_started_task.h"
#include "components/offline_pages/background/remove_requests_task.h"
#include "components/offline_pages/background/request_queue_store.h"
#include "components/offline_pages/background/save_page_request.h"
@@ -159,6 +160,13 @@ void RequestQueue::ChangeRequestsState(
task_queue_.AddTask(std::move(task));
}
+void RequestQueue::MarkAttemptStarted(int64_t request_id,
+ const UpdateCallback& callback) {
+ std::unique_ptr<Task> task(
+ new MarkAttemptStartedTask(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