| 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 0a0ebdb23c01345f3a6a8547ce4dd4213c6f98de..532725cc87cf3055f6e3f679c2b2e45fbb4b0206 100644
|
| --- a/components/offline_pages/background/request_coordinator.cc
|
| +++ b/components/offline_pages/background/request_coordinator.cc
|
| @@ -69,11 +69,6 @@ void RequestCoordinator::AddRequestResultCallback(
|
| }
|
|
|
| void RequestCoordinator::RequestPicked(const SavePageRequest& request) {
|
| - Scheduler::TriggerCondition conditions;
|
| -
|
| - // Ensure that the scheduler has actively scheduled a task.
|
| - scheduler_->Schedule(conditions);
|
| -
|
| // Send the request on to the offliner.
|
| SendRequestToOffliner(request);
|
| }
|
| @@ -84,7 +79,8 @@ void RequestCoordinator::RequestQueueEmpty() {
|
| }
|
|
|
| bool RequestCoordinator::StartProcessing(
|
| - const base::Callback<void(bool)>& callback) {
|
| + base::Callback<void(bool)> callback) {
|
| + scheduler_callback_ = callback;
|
| // TODO(petewil): Check existing conditions (should be passed down from
|
| // BackgroundTask)
|
|
|
| @@ -128,6 +124,9 @@ void RequestCoordinator::OfflinerDoneCallback(const SavePageRequest& request,
|
| // to the scheduler if we are out of time.
|
|
|
| // TODO(petewil): If the request succeeded, remove it from the Queue.
|
| +
|
| + // Return control to the scheduler when there is no more to do.
|
| + scheduler_callback_.Run(status == Offliner::RequestStatus::SAVED);
|
| }
|
|
|
| } // namespace offline_pages
|
|
|