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

Unified Diff: media/audio/audio_manager_base.h

Issue 148373004: Abort expensive AudioManager methods once shutdown starts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Atomics. Created 6 years, 10 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 | « no previous file | media/audio/audio_manager_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager_base.h
diff --git a/media/audio/audio_manager_base.h b/media/audio/audio_manager_base.h
index 4c088fb54ffb6b9dff7a4768fb9069ca6cc1c5ac..22d5d497bc9ef38edf042bd027163a1d51369596 100644
--- a/media/audio/audio_manager_base.h
+++ b/media/audio/audio_manager_base.h
@@ -8,6 +8,7 @@
#include <string>
#include <utility>
+#include "base/atomic_ref_count.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
@@ -196,6 +197,9 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
// Proxy for creating AudioLog objects.
AudioLogFactory* const audio_log_factory_;
+ // Used to exit early from expensive methods after shutdown has started.
+ base::AtomicRefCount in_shutdown_;
+
DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
};
« no previous file with comments | « no previous file | media/audio/audio_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698