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

Unified Diff: third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc

Issue 2122543002: Replace Closure in TaskRunner::PostTask with OneShotCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@07_oneshot
Patch Set: fix Created 4 years, 3 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: third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
index 300260e5a514c7a9dcca3a94cca94bec002982e6..bb6efb6a4c941e7cb6a048fa3c03490905589a1c 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
@@ -1835,14 +1835,14 @@ class RendererSchedulerImplWithMessageLoopTest
~RendererSchedulerImplWithMessageLoopTest() override {}
void PostFromNestedRunloop(
- std::vector<std::pair<SingleThreadIdleTaskRunner::IdleTask, bool>>*
+ std::vector<std::pair<SingleThreadIdleTaskRunner::IdleTask, bool>>
tasks) {
base::MessageLoop::ScopedNestableTaskAllower allow(message_loop_.get());
- for (std::pair<SingleThreadIdleTaskRunner::IdleTask, bool>& pair : *tasks) {
+ for (std::pair<SingleThreadIdleTaskRunner::IdleTask, bool>& pair : tasks) {
if (pair.second) {
- idle_task_runner_->PostIdleTask(FROM_HERE, pair.first);
+ idle_task_runner_->PostIdleTask(FROM_HERE, std::move(pair.first));
} else {
- idle_task_runner_->PostNonNestableIdleTask(FROM_HERE, pair.first);
+ idle_task_runner_->PostNonNestableIdleTask(FROM_HERE, std::move(pair.first));
}
}
EnableIdleTasks();
@@ -1875,10 +1875,10 @@ TEST_F(RendererSchedulerImplWithMessageLoopTest,
default_task_runner_->PostTask(
FROM_HERE,
- base::Bind(
+ base::BindOnce(
&RendererSchedulerImplWithMessageLoopTest::PostFromNestedRunloop,
base::Unretained(this),
- base::Unretained(&tasks_to_post_from_nested_loop)));
+ std::move(tasks_to_post_from_nested_loop)));
EnableIdleTasks();
RunUntilIdle();

Powered by Google App Engine
This is Rietveld 408576698