diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-24 12:15:48 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 13:30:04 +0000 |
commit | b014812705fc80bff0a5c120dfcef88f349816dc (patch) | |
tree | 25a2e2d9fa285f1add86aa333389a839f81a39ae /chromium/components/offline_pages/core/background/reconcile_task.cc | |
parent | 9f4560b1027ae06fdb497023cdcaf91b8511fa74 (diff) | |
download | qtwebengine-chromium-b014812705fc80bff0a5c120dfcef88f349816dc.tar.gz |
BASELINE: Update Chromium to 68.0.3440.125
Change-Id: I23f19369e01f688e496f5bf179abb521ad73874f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/offline_pages/core/background/reconcile_task.cc')
-rw-r--r-- | chromium/components/offline_pages/core/background/reconcile_task.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/chromium/components/offline_pages/core/background/reconcile_task.cc b/chromium/components/offline_pages/core/background/reconcile_task.cc index 66833e859e4..f1774344c51 100644 --- a/chromium/components/offline_pages/core/background/reconcile_task.cc +++ b/chromium/components/offline_pages/core/background/reconcile_task.cc @@ -15,8 +15,8 @@ namespace offline_pages { ReconcileTask::ReconcileTask(RequestQueueStore* store, - const RequestQueueStore::UpdateCallback& callback) - : store_(store), callback_(callback), weak_ptr_factory_(this) {} + RequestQueueStore::UpdateCallback callback) + : store_(store), callback_(std::move(callback)), weak_ptr_factory_(this) {} ReconcileTask::~ReconcileTask() {} @@ -27,8 +27,8 @@ void ReconcileTask::Run() { void ReconcileTask::GetRequests() { // Get all the requests from the queue, we will reconcile them in the // callback. - store_->GetRequests( - base::Bind(&ReconcileTask::Reconcile, weak_ptr_factory_.GetWeakPtr())); + store_->GetRequests(base::BindOnce(&ReconcileTask::Reconcile, + weak_ptr_factory_.GetWeakPtr())); } void ReconcileTask::Reconcile( @@ -47,7 +47,7 @@ void ReconcileTask::Reconcile( for (auto& request : requests) { if (request->request_state() == SavePageRequest::RequestState::OFFLINING) { request->set_request_state(SavePageRequest::RequestState::AVAILABLE); - items_to_update.push_back(*request.get()); + items_to_update.push_back(*request); } } @@ -59,14 +59,14 @@ void ReconcileTask::Reconcile( } store_->UpdateRequests(items_to_update, - base::Bind(&ReconcileTask::UpdateCompleted, - weak_ptr_factory_.GetWeakPtr())); + base::BindOnce(&ReconcileTask::UpdateCompleted, + weak_ptr_factory_.GetWeakPtr())); } void ReconcileTask::UpdateCompleted( std::unique_ptr<UpdateRequestsResult> update_result) { // Send a notification to the UI that these items have updated. - callback_.Run(std::move(update_result)); + std::move(callback_).Run(std::move(update_result)); TaskComplete(); } |