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

Unified Diff: media/audio/audio_manager_base.h

Issue 2784433002: Ensures that audio tasks cannot run after AudioManager is deleted. (Closed)
Patch Set: cleanup Created 3 years, 8 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/audio_manager_base.h
diff --git a/media/audio/audio_manager_base.h b/media/audio/audio_manager_base.h
index a80f63c1aef6b8b5150aadb7a7b077907f37bf4c..ec9322319a11118a109a81781d665388301497d0 100644
--- a/media/audio/audio_manager_base.h
+++ b/media/audio/audio_manager_base.h
@@ -111,16 +111,11 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
int output_stream_count() const { return num_output_streams_; }
protected:
- AudioManagerBase(
- scoped_refptr<base::SingleThreadTaskRunner> task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner,
- AudioLogFactory* audio_log_factory);
-
- // Releases all the audio output dispatchers.
- // All audio streams should be closed before Shutdown() is called.
- // This must be called in the destructor of every AudioManagerBase
- // implementation.
- void Shutdown();
+ AudioManagerBase(std::unique_ptr<AudioThread> audio_thread,
+ AudioLogFactory* audio_log_factory);
+
+ // AudioManager:
+ void ShutdownOnAudioThread() override;
void SetMaxOutputStreamsAllowed(int max) { max_num_output_streams_ = max; }

Powered by Google App Engine
This is Rietveld 408576698