Commit 5557e45e authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

[base] Make PostTask destination explicit in /chrome/browser/chromeos/app_mode

Task APIs v3 will all have an explicit destination. In the past
"default traits" meant ThreadPool. These CLs are thus a no-op
except for the few callers that clearly wanted to post a QuitClosure()
on the current thread (posting a QuitClosure() to a parallel task will
merely bounce it back to the current thread anyways). Those few callers
were migrated to ThreadTaskRunnerHandle::Get().

These changes are thus required to phase out task APIs v2 (post_task.h)
Design doc: https://docs.google.com/document/d/1tssusPykvx3g0gvbvU4HxGyn3MjJlIylnsH13-Tv6s4/edit

This specific change is a subset of
https://chromium-review.googlesource.com/c/chromium/src/+/2216733

This CL was uploaded by git cl split.

R=anqing@chromium.org

Bug: 1026641
Change-Id: I89a068370f65f68feb17379b74031c7f8011f289
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2216734
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarAnqing Zhao <anqing@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772385}
parent 6f9509bd
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "base/task/post_task.h"
#include "base/task/task_traits.h" #include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/test/scoped_path_override.h" #include "base/test/scoped_path_override.h"
#include "base/threading/thread_restrictions.h" #include "base/threading/thread_restrictions.h"
#include "base/time/time.h" #include "base/time/time.h"
...@@ -108,7 +108,7 @@ class KioskAppUpdateServiceTest ...@@ -108,7 +108,7 @@ class KioskAppUpdateServiceTest
// Wait for |automatic_reboot_manager_| to finish initializing. // Wait for |automatic_reboot_manager_| to finish initializing.
bool initialized = false; bool initialized = false;
base::RunLoop run_loop; base::RunLoop run_loop;
base::PostTask( base::ThreadPool::PostTask(
FROM_HERE, FROM_HERE,
base::BindOnce(&WaitForAutomaticRebootManagerInit, base::BindOnce(&WaitForAutomaticRebootManagerInit,
base::Unretained(automatic_reboot_manager_), base::Unretained(automatic_reboot_manager_),
......
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