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

Unified Diff: media/audio/audio_streams_tracker.h

Issue 2655413004: Strip out stream counting from AudioRendererHost. (Closed)
Patch Set: Add moar DCHECKs. Created 3 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 | « media/audio/BUILD.gn ('k') | media/audio/audio_streams_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_streams_tracker.h
diff --git a/media/audio/audio_streams_tracker.h b/media/audio/audio_streams_tracker.h
deleted file mode 100644
index 1071fd717f363af9467e5c5732df6276f876bc96..0000000000000000000000000000000000000000
--- a/media/audio/audio_streams_tracker.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_AUDIO_AUDIO_STREAMS_TRACKER_H_
-#define MEDIA_AUDIO_AUDIO_STREAMS_TRACKER_H_
-
-#include <stddef.h>
-
-#include "base/gtest_prod_util.h"
-#include "base/macros.h"
-#include "base/threading/thread_checker.h"
-#include "media/base/media_export.h"
-
-namespace media {
-
-// Tracks the maximum number of simultaneous streams that was ever registered.
-// All functions must be called on the same thread.
-class MEDIA_EXPORT AudioStreamsTracker {
- public:
- AudioStreamsTracker();
- ~AudioStreamsTracker();
-
- // Increases/decreases current stream count. Updates max stream count if
- // current count is larger.
- void IncreaseStreamCount();
- void DecreaseStreamCount(size_t count = 1);
-
- // Resets the max stream count, i.e. sets it to the current stream count.
- void ResetMaxStreamCount();
-
- size_t max_stream_count() const;
-
- private:
- FRIEND_TEST_ALL_PREFIXES(AudioStreamsTrackerTest, IncreaseAndDecreaseOnce);
- FRIEND_TEST_ALL_PREFIXES(AudioStreamsTrackerTest,
- IncreaseAndDecreaseMultiple);
-
- // Confirms single-threaded access.
- base::ThreadChecker thread_checker_;
-
- // Stores the current and maximum number of streams.
- size_t current_stream_count_;
- size_t max_stream_count_;
-
- DISALLOW_COPY_AND_ASSIGN(AudioStreamsTracker);
-};
-
-} // namespace media
-
-#endif // MEDIA_AUDIO_AUDIO_STREAMS_TRACKER_H_
« no previous file with comments | « media/audio/BUILD.gn ('k') | media/audio/audio_streams_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698