| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/audio/audio_streams_tracker.h" | 5 #include "media/audio/audio_streams_tracker.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 namespace media { | 9 namespace media { |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 void AudioStreamsTracker::ResetMaxStreamCount() { | 34 void AudioStreamsTracker::ResetMaxStreamCount() { |
| 35 DCHECK(thread_checker_.CalledOnValidThread()); | 35 DCHECK(thread_checker_.CalledOnValidThread()); |
| 36 max_stream_count_ = current_stream_count_; | 36 max_stream_count_ = current_stream_count_; |
| 37 } | 37 } |
| 38 | 38 |
| 39 size_t AudioStreamsTracker::max_stream_count() const { | 39 size_t AudioStreamsTracker::max_stream_count() const { |
| 40 DCHECK(thread_checker_.CalledOnValidThread()); | 40 DCHECK(thread_checker_.CalledOnValidThread()); |
| 41 return max_stream_count_; | 41 return max_stream_count_; |
| 42 } | 42 } |
| 43 | 43 |
| 44 void AudioStreamsTracker::DetachFromThreadForTesting() { |
| 45 DCHECK_EQ(current_stream_count_, 0u); |
| 46 DCHECK(thread_checker_.CalledOnValidThread()); |
| 47 thread_checker_.DetachFromThread(); |
| 48 } |
| 49 |
| 44 } // namespace media | 50 } // namespace media |
| OLD | NEW |