| Index: media/audio/sounds/sounds_manager.cc
|
| diff --git a/media/audio/sounds/sounds_manager.cc b/media/audio/sounds/sounds_manager.cc
|
| index c678645eae247eb460ae38f35e7c87438fb46b90..46ba140d8b95cb9a080f15dffc2a9e3c1e4aca8a 100644
|
| --- a/media/audio/sounds/sounds_manager.cc
|
| +++ b/media/audio/sounds/sounds_manager.cc
|
| @@ -23,7 +23,9 @@ bool g_initialized_for_testing = false;
|
| class SoundsManagerImpl : public SoundsManager {
|
| public:
|
| SoundsManagerImpl() {}
|
| - ~SoundsManagerImpl() override { DCHECK(CalledOnValidThread()); }
|
| + ~SoundsManagerImpl() override {
|
| + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
| + }
|
|
|
| // SoundsManager implementation:
|
| bool Initialize(SoundKey key, const base::StringPiece& data) override;
|
| @@ -62,13 +64,13 @@ bool SoundsManagerImpl::Initialize(SoundKey key,
|
| }
|
|
|
| bool SoundsManagerImpl::Play(SoundKey key) {
|
| - DCHECK(CalledOnValidThread());
|
| + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
| AudioStreamHandler* handler = GetHandler(key);
|
| return handler && handler->Play();
|
| }
|
|
|
| bool SoundsManagerImpl::Stop(SoundKey key) {
|
| - DCHECK(CalledOnValidThread());
|
| + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
| AudioStreamHandler* handler = GetHandler(key);
|
| if (!handler)
|
| return false;
|
| @@ -77,7 +79,7 @@ bool SoundsManagerImpl::Stop(SoundKey key) {
|
| }
|
|
|
| base::TimeDelta SoundsManagerImpl::GetDuration(SoundKey key) {
|
| - DCHECK(CalledOnValidThread());
|
| + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
| AudioStreamHandler* handler = GetHandler(key);
|
| return !handler ? base::TimeDelta() : handler->duration();
|
| }
|
| @@ -94,7 +96,9 @@ AudioStreamHandler* SoundsManagerImpl::GetHandler(SoundKey key) {
|
|
|
| SoundsManager::SoundsManager() {}
|
|
|
| -SoundsManager::~SoundsManager() { DCHECK(CalledOnValidThread()); }
|
| +SoundsManager::~SoundsManager() {
|
| + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
| +}
|
|
|
| // static
|
| void SoundsManager::Create() {
|
|
|