Chromium Code Reviews| Index: content/browser/browser_main_loop.cc |
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
| index cfaddafe06bd847eb382a18ff16eefbaf1c5618f..8ce475cbc8ea1aeddf6792ff1641f88fabaca99e 100644 |
| --- a/content/browser/browser_main_loop.cc |
| +++ b/content/browser/browser_main_loop.cc |
| @@ -68,6 +68,7 @@ |
| #include "content/browser/media/media_internals.h" |
| #include "content/browser/memory/memory_coordinator_impl.h" |
| #include "content/browser/net/browser_online_state_observer.h" |
| +#include "content/browser/renderer_host/media/audio_debug_file_writer.h" |
| #include "content/browser/renderer_host/media/media_stream_manager.h" |
| #include "content/browser/renderer_host/render_process_host_impl.h" |
| #include "content/browser/service_manager/service_manager_context.h" |
| @@ -1795,6 +1796,15 @@ void BrowserMainLoop::CreateAudioManager() { |
| audio_manager_ = media::AudioManager::Create( |
| audio_thread_->task_runner(), audio_thread_->worker_task_runner(), |
| MediaInternals::GetInstance()); |
| +#if BUILDFLAG(ENABLE_WEBRTC) |
| + // AudioManager is deleted on the audio thread, so it's safe to post |
| + // unretained. |
| + audio_manager_->GetTaskRunner()->PostTask( |
|
pfeldman
2017/02/14 19:44:28
Why is this here, but not in the media::AudioMana
Henrik Grunell
2017/02/14 20:22:17
That's a good point. There was a discussion earlie
DaleCurtis
2017/02/14 20:30:29
Don't want this added as a parameter; instead I'd
Henrik Grunell
2017/02/15 11:45:11
That sounds like a reasonable option, I've changed
|
| + FROM_HERE, |
| + base::Bind(&media::AudioManager::InitializeOutputDebugRecording, |
| + base::Unretained(audio_manager_.get()), |
| + base::BindRepeating(&AudioDebugFileWriter::Create))); |
| +#endif |
| } |
| CHECK(audio_manager_); |