Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1018)

Unified Diff: media/audio/test_audio_input_controller_factory.cc

Issue 2624403002: Refactor AudioInputController and related interfaces. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/audio/test_audio_input_controller_factory.cc
diff --git a/media/audio/test_audio_input_controller_factory.cc b/media/audio/test_audio_input_controller_factory.cc
index 024e7adee732a2cd16c3be7420a4f42a5cfba86f..9e8c71f603856fac0404618a78a09db4cbcf4674 100644
--- a/media/audio/test_audio_input_controller_factory.cc
+++ b/media/audio/test_audio_input_controller_factory.cc
@@ -15,16 +15,15 @@ TestAudioInputController::TestAudioInputController(
EventHandler* event_handler,
SyncWriter* sync_writer,
UserInputMonitor* user_input_monitor)
- : AudioInputController(event_handler,
+ : AudioInputController(audio_manager->GetTaskRunner(),
+ event_handler,
sync_writer,
nullptr,
user_input_monitor,
false),
audio_parameters_(audio_parameters),
factory_(factory),
- event_handler_(event_handler) {
- task_runner_ = audio_manager->GetTaskRunner();
-}
+ event_handler_(event_handler) {}
TestAudioInputController::~TestAudioInputController() {
// Inform the factory so that it allows creating new instances in future.
@@ -37,7 +36,7 @@ void TestAudioInputController::Record() {
}
void TestAudioInputController::Close(const base::Closure& closed_task) {
- task_runner_->PostTask(FROM_HERE, closed_task);
+ GetTaskRunnerForTesting()->PostTask(FROM_HERE, closed_task);
if (factory_->delegate_)
factory_->delegate_->TestAudioControllerClosed(this);
}

Powered by Google App Engine
This is Rietveld 408576698