summaryrefslogtreecommitdiff
path: root/chromium/content/browser/audio/audio_service.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/audio/audio_service.cc')
-rw-r--r--chromium/content/browser/audio/audio_service.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/chromium/content/browser/audio/audio_service.cc b/chromium/content/browser/audio/audio_service.cc
index cf3f44a6b6f..1cab549ee15 100644
--- a/chromium/content/browser/audio/audio_service.cc
+++ b/chromium/content/browser/audio/audio_service.cc
@@ -10,7 +10,6 @@
#include "base/no_destructor.h"
#include "base/optional.h"
#include "base/strings/string_number_conversions.h"
-#include "base/task/post_task.h"
#include "base/threading/sequence_local_storage_slot.h"
#include "base/time/time.h"
#include "build/build_config.h"
@@ -73,8 +72,8 @@ bool IsAudioServiceOutOfProcess() {
void BindSystemInfoFromAnySequence(
mojo::PendingReceiver<audio::mojom::SystemInfo> receiver) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- base::PostTask(
- FROM_HERE, {BrowserThread::UI},
+ GetUIThreadTaskRunner({})->PostTask(
+ FROM_HERE,
base::BindOnce(&BindSystemInfoFromAnySequence, std::move(receiver)));
return;
}
@@ -85,8 +84,8 @@ void BindSystemInfoFromAnySequence(
void BindStreamFactoryFromAnySequence(
mojo::PendingReceiver<audio::mojom::StreamFactory> receiver) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- base::PostTask(
- FROM_HERE, {BrowserThread::UI},
+ GetUIThreadTaskRunner({})->PostTask(
+ FROM_HERE,
base::BindOnce(&BindStreamFactoryFromAnySequence, std::move(receiver)));
return;
}