diff options
Diffstat (limited to 'chromium/content/browser/speech/speech_recognition_browsertest.cc')
-rw-r--r-- | chromium/content/browser/speech/speech_recognition_browsertest.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chromium/content/browser/speech/speech_recognition_browsertest.cc b/chromium/content/browser/speech/speech_recognition_browsertest.cc index 3288ddad032..2ccefdd702a 100644 --- a/chromium/content/browser/speech/speech_recognition_browsertest.cc +++ b/chromium/content/browser/speech/speech_recognition_browsertest.cc @@ -17,12 +17,14 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/sys_byteorder.h" +#include "base/task/post_task.h" #include "base/threading/thread_task_runner_handle.h" #include "build/build_config.h" #include "content/browser/speech/proto/google_streaming_api.pb.h" #include "content/browser/speech/speech_recognition_engine.h" #include "content/browser/speech/speech_recognition_manager_impl.h" #include "content/browser/speech/speech_recognizer_impl.h" +#include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_types.h" #include "content/public/browser/web_contents.h" @@ -58,8 +60,8 @@ class MockAudioSystem : public media::AudioSystem { // Posting callback to allow current SpeechRecognizerImpl dispatching event // to complete before transitioning to the next FSM state. - content::BrowserThread::PostTask( - content::BrowserThread::IO, FROM_HERE, + base::PostTaskWithTraits( + FROM_HERE, {content::BrowserThread::IO}, base::BindOnce(std::move(on_params_cb), media::AudioParameters::UnavailableDeviceParams())); } @@ -227,8 +229,8 @@ class SpeechRecognitionBrowserTest : public ContentBrowserTest { // AudioCaptureSourcer::Stop() again. SpeechRecognizerImpl::SetAudioEnvironmentForTesting(nullptr, nullptr); - content::BrowserThread::PostTask( - content::BrowserThread::UI, FROM_HERE, + base::PostTaskWithTraits( + FROM_HERE, {content::BrowserThread::UI}, base::BindOnce(&SpeechRecognitionBrowserTest::SendResponse, base::Unretained(this))); } |