Update net/third_party/nss/ssl to NSS 3.15.1.
[chromium-blink-merge.git] / media / audio / audio_manager.cc
blob3f49a45ad87eb770ff15690a4a4d25966d41aa72
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "media/audio/audio_manager.h"
7 #include "base/at_exit.h"
8 #include "base/atomicops.h"
9 #include "base/bind.h"
10 #include "base/bind_helpers.h"
11 #include "base/logging.h"
12 #include "base/message_loop/message_loop.h"
14 namespace media {
15 namespace {
16 AudioManager* g_last_created = NULL;
19 // Forward declaration of the platform specific AudioManager factory function.
20 AudioManager* CreateAudioManager();
22 AudioManager::AudioManager() {
25 AudioManager::~AudioManager() {
26 CHECK(g_last_created == NULL || g_last_created == this);
27 g_last_created = NULL;
30 // static
31 AudioManager* AudioManager::Create() {
32 CHECK(g_last_created == NULL);
33 g_last_created = CreateAudioManager();
34 return g_last_created;
37 // static
38 AudioManager* AudioManager::Get() {
39 return g_last_created;
42 } // namespace media