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

Unified Diff: media/audio/audio_streams_tracker.h

Issue 2655413004: Strip out stream counting from AudioRendererHost. (Closed)
Patch Set: Created 3 years, 11 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
Index: media/audio/audio_streams_tracker.h
diff --git a/media/audio/audio_streams_tracker.h b/media/audio/audio_streams_tracker.h
index 1071fd717f363af9467e5c5732df6276f876bc96..22dd2531414b845fbf910fe315e852400acbc0ee 100644
--- a/media/audio/audio_streams_tracker.h
+++ b/media/audio/audio_streams_tracker.h
@@ -24,12 +24,13 @@ class MEDIA_EXPORT AudioStreamsTracker {
// Increases/decreases current stream count. Updates max stream count if
// current count is larger.
void IncreaseStreamCount();
- void DecreaseStreamCount(size_t count = 1);
+ void DecreaseStreamCount();
// Resets the max stream count, i.e. sets it to the current stream count.
void ResetMaxStreamCount();
- size_t max_stream_count() const;
+ bool has_streams() const { return !!current_stream_count_; }
+ size_t max_stream_count() const { return max_stream_count_; }
o1ka 2017/01/30 12:19:13 These two need thread checks.
DaleCurtis 2017/01/30 21:12:19 Okay, but they can't be hacker_style() then, so I'
DaleCurtis 2017/02/06 22:19:03 Deleted this whole class instead. It's overkill fo
private:
FRIEND_TEST_ALL_PREFIXES(AudioStreamsTrackerTest, IncreaseAndDecreaseOnce);

Powered by Google App Engine
This is Rietveld 408576698