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

apps: 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: I25230a83101d68c44929f19434d38e0620ee0b95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2063009
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742575}
parent dda34cae
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "apps/test/app_window_waiter.h" #include "apps/test/app_window_waiter.h"
#include "base/task/post_task.h" #include "base/task/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
#include "extensions/browser/app_window/app_window.h" #include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/app_window/native_app_window.h" #include "extensions/browser/app_window/native_app_window.h"
...@@ -52,7 +53,8 @@ extensions::AppWindow* AppWindowWaiter::WaitForShownWithTimeout( ...@@ -52,7 +53,8 @@ extensions::AppWindow* AppWindowWaiter::WaitForShownWithTimeout(
wait_type_ = WAIT_FOR_SHOWN; wait_type_ = WAIT_FOR_SHOWN;
run_loop_ = std::make_unique<base::RunLoop>(); run_loop_ = std::make_unique<base::RunLoop>();
base::PostDelayedTask(FROM_HERE, run_loop_->QuitClosure(), timeout); base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, run_loop_->QuitClosure(), timeout);
run_loop_->Run(); run_loop_->Run();
return window_; return window_;
......
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