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

Unified Diff: media/audio/audio_manager.cc

Issue 11260002: Fix invalid bind usage during AudioManagerBase construction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Gotta catch'em all. Created 8 years, 2 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
« no previous file with comments | « media/audio/audio_manager.h ('k') | media/audio/audio_manager_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager.cc
diff --git a/media/audio/audio_manager.cc b/media/audio/audio_manager.cc
index 11af0ac8e1c0f9d219aad9061839c76da3617517..787750a4d33346c750b3f3cc1b266e9335731171 100644
--- a/media/audio/audio_manager.cc
+++ b/media/audio/audio_manager.cc
@@ -5,6 +5,8 @@
#include "media/audio/audio_manager.h"
#include "base/at_exit.h"
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/logging.h"
#include "base/message_loop.h"
@@ -21,7 +23,12 @@ AudioManager::~AudioManager() {
// static
AudioManager* AudioManager::Create() {
- return CreateAudioManager();
+ AudioManager* manager = CreateAudioManager();
+ if (manager) {
+ manager->GetMessageLoop()->PostTask(FROM_HERE, base::Bind(
+ &AudioManager::InitializeOnAudioThread, base::Unretained(manager)));
+ }
+ return manager;
}
} // namespace media
« no previous file with comments | « media/audio/audio_manager.h ('k') | media/audio/audio_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698