Chromium Code Reviews| Index: components/offline_pages/core/background/request_coordinator.cc |
| diff --git a/components/offline_pages/core/background/request_coordinator.cc b/components/offline_pages/core/background/request_coordinator.cc |
| index 5a363c0a8b056e1a7edc003e0180e37577d5891b..7890914641a7f9b093a94e8deb5fde97619b5e51 100644 |
| --- a/components/offline_pages/core/background/request_coordinator.cc |
| +++ b/components/offline_pages/core/background/request_coordinator.cc |
| @@ -425,6 +425,8 @@ void RequestCoordinator::PauseRequests( |
| void RequestCoordinator::ResumeRequests( |
| const std::vector<int64_t>& request_ids) { |
| + std::copy(request_ids.begin(), request_ids.end(), |
| + std::back_inserter(priortized_requests_)); |
|
Pete Williamson
2017/03/06 18:30:57
After thinking about it a bit, I think the user wi
romax
2017/03/07 18:40:44
Done.
|
| queue_->ChangeRequestsState( |
| request_ids, SavePageRequest::RequestState::AVAILABLE, |
| base::Bind(&RequestCoordinator::UpdateMultipleRequestsCallback, |
| @@ -685,16 +687,17 @@ void RequestCoordinator::TryNextRequest(bool is_start_of_processing) { |
| return; |
| } |
| - // Ask request queue to make a new PickRequestTask object, then put it on the |
| - // task queue. |
| + // Ask request queue to make a new PickRequestTask object, then put it on |
| + // the task queue. |
| queue_->PickNextRequest( |
| - policy_.get(), base::Bind(&RequestCoordinator::RequestPicked, |
| - weak_ptr_factory_.GetWeakPtr()), |
| + policy_.get(), |
| + base::Bind(&RequestCoordinator::RequestPicked, |
| + weak_ptr_factory_.GetWeakPtr()), |
| base::Bind(&RequestCoordinator::RequestNotPicked, |
| weak_ptr_factory_.GetWeakPtr()), |
| base::Bind(&RequestCoordinator::RequestCounts, |
| weak_ptr_factory_.GetWeakPtr(), is_start_of_processing), |
| - *current_conditions_.get(), disabled_requests_); |
| + *current_conditions_.get(), disabled_requests_, priortized_requests_); |
| // TODO(petewil): Verify current_conditions has a good value on all calling |
| // paths. It is really more of a "last known conditions" than "current |
| // conditions". Consider having a call to Java to check the current |