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

Unified Diff: media/audio/audio_output_dispatcher.h

Issue 9255017: Add thread safety to AudioManagerBase to protect access to the audio thread member variable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/audio_output_dispatcher.h
diff --git a/media/audio/audio_output_dispatcher.h b/media/audio/audio_output_dispatcher.h
index 08e6893b6b9ffde60ee75be0ee129c26f0c7c5a7..4eb9512bd1ea8e4b14ef6895e4373bbf6fc0dda8 100644
--- a/media/audio/audio_output_dispatcher.h
+++ b/media/audio/audio_output_dispatcher.h
@@ -69,7 +69,10 @@ class MEDIA_EXPORT AudioOutputDispatcher
// Called on the audio thread when the AudioManager is shutting down.
void Shutdown();
- MessageLoop* message_loop();
+ // Used to DCHECK correct usage. The method _should_ always be called
+ // from the audio thread, so we don't have any locks to protect the
+ // message loop pointer.
+ bool CurrentThreadIsAudioThread() const;
private:
friend class AudioOutputProxyTest;

Powered by Google App Engine
This is Rietveld 408576698