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

Unified Diff: media/audio/audio_streams_tracker.cc

Issue 2578983003: Add AudioStreamRegistry. Move stream counting logic (Closed)
Patch Set: Add missing EXPECT_TRUE. Created 4 years 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
Index: media/audio/audio_streams_tracker.cc
diff --git a/media/audio/audio_streams_tracker.cc b/media/audio/audio_streams_tracker.cc
index 5363796df737f3667923479b192ddc709730c1a5..5266e68aac8ca9ba0e7c17bf3c38827a29e7c9d2 100644
--- a/media/audio/audio_streams_tracker.cc
+++ b/media/audio/audio_streams_tracker.cc
@@ -41,4 +41,10 @@ size_t AudioStreamsTracker::max_stream_count() const {
return max_stream_count_;
}
+void AudioStreamsTracker::DetachFromThreadForTesting() {
+ DCHECK_EQ(current_stream_count_, 0u);
+ DCHECK(thread_checker_.CalledOnValidThread());
+ thread_checker_.DetachFromThread();
+}
+
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698