Commit fd097bcf authored by Sami Kyostila's avatar Sami Kyostila Committed by Commit Bot

ash: Make destination for base::PostDelayedTask() explicit

When posting tasks with base::PostDelayedTask(), explicitly specify whether the
tasks should run on the thread pool on a specific named thread. This is in
preparation for making it always mandatory to specify the destination for posted
tasks.

This patch has no functional changes.

This CL was uploaded by git cl split.

Bug: 968047
Change-Id: I7647e425e2d58b5b23df3cc7bb391665f1c87902
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2063010
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742594}
parent ac7bd9fb
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/system/sys_info.h" #include "base/system/sys_info.h"
#include "base/task/post_task.h" #include "base/threading/thread_task_runner_handle.h"
#include "ui/base/test/ui_controls.h" #include "ui/base/test/ui_controls.h"
// Test overview enter/exit animations with following conditions // Test overview enter/exit animations with following conditions
...@@ -46,8 +46,9 @@ class OverviewAnimationsTest ...@@ -46,8 +46,9 @@ class OverviewAnimationsTest
int wait_seconds = (base::SysInfo::IsRunningOnChromeOS() ? 5 : 0) + int wait_seconds = (base::SysInfo::IsRunningOnChromeOS() ? 5 : 0) +
n_browsers * cost_per_browser; n_browsers * cost_per_browser;
base::RunLoop run_loop; base::RunLoop run_loop;
base::PostDelayedTask(FROM_HERE, run_loop.QuitClosure(), base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
base::TimeDelta::FromSeconds(wait_seconds)); FROM_HERE, run_loop.QuitClosure(),
base::TimeDelta::FromSeconds(wait_seconds));
run_loop.Run(); run_loop.Run();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment