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

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

Issue 2030773002: Add unit tests for the Background Scheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable flaky test Created 4 years, 6 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_coordinator.cc
diff --git a/components/offline_pages/background/request_coordinator.cc b/components/offline_pages/background/request_coordinator.cc
index 940b3e7f29f1e45c8863fe00a326bdd34cd7b28d..3481218caf43d8f77796d78ebf46eb9522924a1b 100644
--- a/components/offline_pages/background/request_coordinator.cc
+++ b/components/offline_pages/background/request_coordinator.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/bind.h"
+#include "base/callback.h"
#include "base/logging.h"
#include "components/offline_pages/background/offliner_factory.h"
#include "components/offline_pages/background/offliner_policy.h"
@@ -78,7 +79,7 @@ void RequestCoordinator::RequestQueueEmpty() {
}
bool RequestCoordinator::StartProcessing(
- const ProcessingDoneCallback& callback) {
+ const base::Callback<void(bool)>& callback) {
// TODO(petewil): Check existing conditions (should be passed down from
// BackgroundTask)
@@ -96,6 +97,7 @@ void RequestCoordinator::StopProcessing() {
}
void RequestCoordinator::SendRequestToOffliner(const SavePageRequest& request) {
+ // TODO(petewil): Ensure only one offliner at a time is used.
// TODO(petewil): When we have multiple offliners, we need to pick one.
Offliner* offliner = factory_->GetOffliner(policy_.get());
if (!offliner) {

Powered by Google App Engine
This is Rietveld 408576698