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

Unified Diff: components/copresence/handlers/audio/audio_directive_list.h

Issue 665353002: Add AudioDirectiveHandler timed tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audio_redesign
Patch Set: build fix. Created 6 years, 2 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: components/copresence/handlers/audio/audio_directive_list.h
diff --git a/components/copresence/handlers/audio/audio_directive_list.h b/components/copresence/handlers/audio/audio_directive_list.h
index e9d0634204d7a7f3d7b9d857a6b8cb58fb9a3189..aa71a994e30f697dbcc661c6d5340cbb556bbf70 100644
--- a/components/copresence/handlers/audio/audio_directive_list.h
+++ b/components/copresence/handlers/audio/audio_directive_list.h
@@ -10,19 +10,18 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
-namespace base {
-class TickClock;
-}
-
namespace media {
class AudioBusRefCounted;
}
namespace copresence {
+class TickClockRefCounted;
+
struct AudioDirective final {
// Default ctor, required by the priority queue.
AudioDirective();
@@ -50,6 +49,8 @@ class AudioDirectiveList {
scoped_ptr<AudioDirective> GetActiveDirective();
+ void set_clock_for_testing(const scoped_refptr<TickClockRefCounted>& clock);
+
private:
// Comparator for comparing end_times on audio tokens.
class LatestFirstComparator {
@@ -68,7 +69,7 @@ class AudioDirectiveList {
// element. Only currently active directives will exist in this list.
std::vector<AudioDirective> active_directives_;
- scoped_ptr<base::TickClock> clock_;
+ scoped_refptr<TickClockRefCounted> clock_;
DISALLOW_COPY_AND_ASSIGN(AudioDirectiveList);
};

Powered by Google App Engine
This is Rietveld 408576698