Index: device/bluetooth/test/bluetooth_test_win.cc |
diff --git a/device/bluetooth/test/bluetooth_test_win.cc b/device/bluetooth/test/bluetooth_test_win.cc |
index 46c39cd09b3a839dc3df1929f4e14b7b0205e8ed..00fd63569aa91b4207e34a0c7983e370e4ece1d2 100644 |
--- a/device/bluetooth/test/bluetooth_test_win.cc |
+++ b/device/bluetooth/test/bluetooth_test_win.cc |
@@ -472,14 +472,13 @@ win::GattCharacteristic* BluetoothTestWin::GetSimulatedCharacteristic( |
void BluetoothTestWin::RunPendingTasksUntilCallback() { |
std::deque<base::TestPendingTask> tasks = |
- bluetooth_task_runner_->GetPendingTasks(); |
- bluetooth_task_runner_->ClearPendingTasks(); |
+ bluetooth_task_runner_->TakePendingTasks(); |
int original_callback_count = callback_count_; |
int original_error_callback_count = error_callback_count_; |
do { |
- base::TestPendingTask task = tasks.front(); |
+ base::TestPendingTask task = std::move(tasks.front()); |
tasks.pop_front(); |
- task.task.Run(); |
+ std::move(task.task).Run(); |
base::RunLoop().RunUntilIdle(); |
} while (tasks.size() && callback_count_ == original_callback_count && |
error_callback_count_ == original_error_callback_count); |
@@ -487,10 +486,10 @@ void BluetoothTestWin::RunPendingTasksUntilCallback() { |
// Put the rest of pending tasks back to Bluetooth task runner. |
for (const auto& task : tasks) { |
if (task.delay.is_zero()) { |
- bluetooth_task_runner_->PostTask(task.location, task.task); |
+ bluetooth_task_runner_->PostTask(task.location, std::move(task.task)); |
} else { |
- bluetooth_task_runner_->PostDelayedTask(task.location, task.task, |
- task.delay); |
+ bluetooth_task_runner_->PostDelayedTask(task.location, |
+ std::move(task.task), task.delay); |
} |
} |
} |